Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset NuGet credentials in VS2017

I've specified wrong credentials, which then were remembered. How do I make NuGet forget it?

like image 272
kagetoki Avatar asked Oct 23 '17 13:10

kagetoki


People also ask

Where are NuGet credentials stored?

Globally: to make a credential provider available to all instances of nuget.exe run under the current user's profile, add it to %LocalAppData%\NuGet\CredentialProviders .

What is the default NuGet URL?

The location of the service index for nuget.org is https://api.nuget.org/v3/index.json .


2 Answers

As SayusiAndo guessed, the credentials were stored in Control Panel -> Credential Manager. After removing of which everything works fine.

UPDATE: Two gotchas (as @Jurri mentioned in the comments):

  1. There may be two credentials to delete (Windows and Generic). The generic one, in my case, had "VSCredentials_" prefix.

  2. Restart VS.

like image 96
kagetoki Avatar answered Sep 21 '22 14:09

kagetoki


I ran into a situation where the NuGet credentials I entered into Visual Studio were not in my Credential Manager. Deleting the package source in Visual Studio, closing Visual Studio, reopening Visual Studio, and recreating the package source allowed me to re-enter my credentials.

Hence, if the credentials don't exist in the Credential Manager, it appears deleting the package source and closing Visual Studio may be sufficient to cause Visual Studio to forget the saved credentials.

like image 20
Sander Avatar answered Sep 22 '22 14:09

Sander