Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget Package Source is prompting for credentials

Tags:

proxy

nuget

I am trying to use NuGet (1.5) in VS2010 but whenever I try to "Manage NuGet Packages" -or- use the Package Manager Console to install a package (using the default package source), I get a dialog prompting me for credentials.

NuGet credentials prompt

I am behind a company proxy but my proxy credentials don't work. Cancelling the dialog gives a "(401) Unauthorized" error.

I also use TFS 2010, but I don't know if that's part of the issue. I've tried the solution here: Installing a package with NuGet connects to TFS and gives a 401 error but I can't even get to a point where I can list the packages.

I've tried a different package source as suggested here: NuGet Package Manager error: The remote name could not be resolved with no change.

I tried all of the solutions here: Cannot connect to any online resource to no avail, and this problem TF30063: You are not authorized to access Collection. Nuget and Tfs conflicting was similar but not the same.

Any suggestions?

(edit) More Info:

When I run Fiddler2, here's what I'm getting when I put in the credentials. FW-1 is the company proxy/firewall name, so I'm pretty sure it's an issue with credentials not being passed.

HTTP/1.0 401 Unauthorized
WWW-Authenticate: Basic realm="FW-1.      Reason: no user      Server "
Content-Type: text/html
Content-Length: 166

<TITLE>Error</TITLE>
<BODY>
<H1>Error 401</H1>

FW-1 at firewall2: Unauthorized to access the document.<BR><BR><LI>Authorization is needed for FW-1.<BR><BR>
</BODY>

(edit 2): Here's an image of what Fiddler2 is showing me when I try to repeatedly login. I'm not that familiar with the tool to know what I can do to get more information. Fiddler2 image

like image 295
Adrian Avatar asked Nov 10 '11 19:11

Adrian


People also ask

How do I refresh NuGet 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.

How do I change the source of a NuGet package?

To manage your package sources, select the Settings icon or select Tools > Options. In the Options window, expand the NuGet Package Manager node and select Package Sources. To add a source, select +, edit the Name, enter the URL or path in Source, and then select Update.

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

Can you try this solution: Fixing combination of NuGet and Team Foundation in workgroup configuration: 401 Unauthorized.

like image 198
superkinhluan Avatar answered Nov 10 '22 10:11

superkinhluan