Visual Studio 2012 > Tools > Options > Package Manager > Package Sources
I add a new Package Source pointing to a myget.org url :
http://www.myget.org/F/myfeed/
VS > Tools > Library Package Manager > Manage NuGet Packages for Solution...
I am now prompted for myget credentials. Obviously, it will be inconvenient for developers to have to manually enter credentials every time they work with myget packages.
This blog explains how to store credentials in the machine-level NuGet.config :
https://gist.github.com/xavierdecoster/3205826
but after I follow the steps, VS still prompts me for credentials.
Steps: Go to Control Panel -->User Account -->Credential Manager. In window credentials section update the password of your artifactory with encrypted password. In Generic Credential section update your generic password which starts with VSCredential_ prefix with encrypted password.
Some package sources such as nuget.org use API keys for authentication when pushing packages, rather than username/password credentials. Due to limitations in NuGet, this task cannot be used to set up a NuGet service connection that uses an API key. Instead: Configure a secret variable containing the ApiKey.
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 .
One approach is to use the sources
command:
nuget.exe sources Add|Update -Name feedName -UserName user -Password secret
With this you can either add that source with the credentials or update an existing one. It works perfectly.
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