dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.9k stars 387 forks source link

How to restore packages from pkgs.dev.azure.com #1411

Open kkbruce opened 3 years ago

kkbruce commented 3 years ago

Describe the bug

Like https://github.com/dotnet/interactive/issues/1399#issuecomment-858303908 talk, We also have Azure DevOps solutions, but we don't know how to restore a similar (https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json) suite in Notebook?

Please complete the following:

Which version of .NET Interactive are you using? There are a few ways to find this out:

.NET Interactive
© 2020 Microsoft Corporation
Version: 1.0.225602+88e6d92f1cf8ead1c4c0b982e67b4a63902e00e6
Build date: 2021-05-27T09:16:11.3076724Z
https://github.com/dotnet/interactive
1.0.230701+897ec27256aa312cc872b52b261726684b29d42b

Screenshots

If restore packages from Azure Artifacts, will show 401 (Unauthorized) Error.

Example:

Installing package Microsoft.DotNet.Interactive.SqlServer, version *-*.............
Error: C:\Program Files\dotnet\sdk\5.0.300\NuGet.targets(131,5): error : �L�k���J�ӷ� https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json ���A�ȯ��ޡC [C:\Users\BruceChen\AppData\Local\Temp\nuget\17224--1f65547b-77a1-42ee-b521-3d390a54364d\Project.fsproj]
C:\Program Files\dotnet\sdk\5.0.300\NuGet.targets(131,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\Users\BruceChen\AppData\Local\Temp\nuget\17224--1f65547b-77a1-42ee-b521-3d390a54364d\Project.fsproj]

I reference https://docs.microsoft.com/en-us/azure/devops/artifacts/nuget/dotnet-exe?view=azure-devops, run dotnet restore --interactive is work, no 401 error.

jonsequitur commented 3 years ago

That is a public feed, so I'm surprised you'd see a 401. Maybe this is a transitive issue. Are you still seeing it?

If so, maybe there's actually a different feed returning the 401. Could you run dotnet nuget list source in C:\Users\BruceChen\AppData\Local and see what other feeds are being polled?

@KevinRansom, other ideas?

kkbruce commented 3 years ago

image

Yes, we also have several Azure Artifacts internal feeds, which need to be used through certificate verification. But at the moment, because of this problem ( https://github.com/dotnet/interactive/issues/1412 ), I can't do other tests.

My question is, how to do a non-public Azure Artifacts feeds restore in Notebook?

jonsequitur commented 3 years ago

You can put a Personal Access Token to the feed into your user-level NuGet.config.

We plan to add support for NuGet.config files in the notebook's parent folder hierarchy eventually as well.

SeriousM commented 1 year ago

Any updates on this?

jonsequitur commented 1 year ago

@SeriousM, updates on which part?

It's not clear to me that there's a bug here, just that it's very easy to have NuGet configurations that don't work.