Reputation: 23
Hopefully this isn't a duplicate (if it is, cannot find the answer).
We are trying to store several of our common libraries as NuGet packages and our team lead created an area in the Artifacts (sorry if I fumble on the terminology) to store our packages. I have rights as a contributor and I'm trying to use Nuget Package Explorer (NPE) to create the packages and upload them. I've created a few as offline and pushed them with the command line, but would like to do so within NPE. I'd done this in a prior job but we had a different setup to store them and not in a position to go back and ask what they did.
When I launch NPE and put in the URL of our repository, I'll either get a message saying it cannot load the service index or the metadata was not found. If I go to a browser where I'm not logged on (say use Edge whereas I would normally use Chrome) I'll get a 401 error. I downloaded the NPE source and stepped through the code and at the point where it fails, the inner exception says that a 401 happened.
I've created a PAT so that I can access the repository inside of Visual Studio (2017 & 2019) and that seems to work. So not sure how to make it so that NPE will read my credentials.
And to add to the confusion, this happens when I'm at work and plugged into the local network. Last week I was working at home and everything worked just fine. I don't have to use a VPN and apparently we don't have any sort of proxy setup.
Weird. Help is appreciated, thanks!
Upvotes: 2
Views: 1004
Reputation: 33506
The accepted answer only provided some hints how to discover what to do, here's a walkthrough:
if you don't have a PAT (Personal Access Token), create one
edit relevant nuget.config
file seen by NPE (i.e. the global one, c:\users\<ACCOUNT>\AppData\Roaming\Nuget\nuget.config
)
source
that points to your nuget feed on Azure (i.e. <add key="<BLAH>" value="https://pkgs.dev.azure.com/<COMPANY>/<PROJECT>/_packaging/<FEEDNAME>/nuget/v3/index.json" />
)run Nuget Package Explorer
<BLAH>
or https://pkgs.dev.azure.com/..
, whatever the dropdown shows in the current NPE versionUpvotes: 3
Reputation: 160
Found doc which may be helpful in your scenario. Comparing fiddler traces when NPE is accessed from your work place and remotely can provide further insights.
Upvotes: 0