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?