0

I'm using Visual Studio 2022 Update 17.3.3

I have some nuget packages in a custom store, maintained by my company. Accessing those packages used to work in the past. The way we set it up is generate a PAT on Azure ADO, and then use nuget to register them as package sources like this:

nuget.exe sources add -name mypackagerepo -password myPAT -username username@ourdomain.com -source https://pkgs.dev.azure.com/mycompany/_packaging/mypackagerepo/nuget/v3/index.json

A few days ago, Nuget Package Manager started to fail with the error

[mypackagerepo] Unable to load the service index for source https://mycompany.pkgs.visualstudio.com/_packaging/mypackagerepo/nuget/v3/index.json.

Response status code does not indicate success: 401 (Unauthorized).

If I open that link in a browser, I get HTTP 200 and a valid JSON response.

One series of steps to produce the error is

  • In VS / Tools / Nuget Package Manager / Manage Nuget Packages for Solution
  • In Package source, select the custom package source mypackagerepo
  • In the Browse tab, hit Refresh
  • VS displayes "Error occured"
  • Hit "Show errors in output"
  • The above error message is visible

I tried a bunch of things suggested by others

  • restarted VS
  • restarted my PC
  • removed my %appdata%/Roaming/Nuget/nuget.config file
  • created a new PAT and recreated the package source registrations
  • cleaned up (removed all VS related entries from) my credential cache
  • repaired then reinstalled VS

Any ideas how to fix it?

balintn
  • 988
  • 1
  • 9
  • 19
  • Some of the things listed [here](https://stackoverflow.com/questions/41185443/nuget-connection-attempt-failed-unable-to-load-the-service-index-for-source) you seemed to of tried already, but there are some other answers you should try as well. There are quite a few. – Timothy G. Sep 01 '22 at 17:53

0 Answers0