Whenever I update my NuGet packages in Visual Studio, I am prompted for a username and password regarding a private NuGet feed.
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?
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.
Once you create a NuGet package and have a . nupkg file, you can make the package available to other developers either publicly or privately.
nuget.exe credential provider discovery Credential providers can be installed at the root of the CredentialProviders folder or within a subfolder.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With