Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Private NuGet Feed - Remembering Password

Whenever I update my NuGet packages in Visual Studio, I am prompted for a username and password regarding a private NuGet feed.

enter image description here

Despite me ticking the box [✓] Remember my password, I am prompted to enter password on subsequent NuGet updates.

How can I make it remember my password properly?

like image 716
Walter Avatar asked Mar 11 '16 11:03

Walter


People also ask

How do I access private NuGet packages?

Consume your private NuGet Feed Just copy your package source URL, go to Visual Studio, open the NuGet Package Manager, go to its settings and add a new source. Choose a fancy name, insert the source URL. Done.

Can NuGet packages be private?

Once you create a NuGet package and have a . nupkg file, you can make the package available to other developers either publicly or privately.

Where are NuGet credentials stored?

nuget.exe credential provider discovery Credential providers can be installed at the root of the CredentialProviders folder or within a subfolder.


1 Answers

This is a prompt from Visual Studio and not NuGet. Information entered here is not saved with NuGet. Although it should be cached for the current Visual Studio session.

NuGet stores user names and passwords in its NuGet.Config file. You can save usernames and passwords for protected feeds by adding them to the NuGet.Config file using the nuget.exe command line.

NuGet.exe Sources Update -Name <feedName> -Source <pathToPackageSource> -UserName xxx -Password <secret>

If this is a prompt for a proxy then you can either set it using nuget:

NuGet.exe config -Set HTTP_PROXY=http://127.0.0.1 -Set HTTP_PROXY.USER=domain\user

Or use an environment variable http_proxy with the value specified in the format http://[username]:[password]@proxy.com

like image 196
Matt Ward Avatar answered Sep 22 '22 12:09

Matt Ward