How to Fix NuGet Credential Prompts

The Infragistics private NuGet package feed is a great way to make sure  you’re always using the latest packages. But you’re probably tired of having to enter in the credentials every time you try to browse, download, or update one of your packages.

We’ve identified a fix using the NuGet CLI that will store your credentials for you. First, head over to the NuGet site and download the CLI tool. For our example, we’re using version 4.1 specifically. The download will be the CLI executable directly, so save it somewhere you can get to easily.

Next, verify the name you’re using in Visual Studio for the package source. We’ll need that to run the command. From Visual Studio, open the NuGet Package Manager Settings. Check the name that you’re using for the private feed — in our case, IGPrivate.

Now, from the command prompt you'll use the NuGet CLI to save the credentials. Run the command:

Nuget.exe sources update -Name “IGPrivate” -UserName -Password

And you're done! No more annoying password prompts. If this is your first time using the NuGet CLI, you can check out the NuGet CLI Documentation for more information.