7

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

Community
  • 1
  • 1
Adrian
  • 1,338
  • 8
  • 17
  • 1
    Just to comment that in our company we get this dialog too, but we DO get to the resource by filling our network credentials to get through the proxy. – kroonwijk Nov 10 '11 at 20:17
  • That's really interesting. I can put in the credentials a bunch of times and each time I do, the dialog disappears and instantly reappears to prompt for the credentials again. I thought maybe a proxy setting was forcing it to authenticate against several items, but I don't know how many and I don't want to put in a password 30+ times, anyway. – Adrian Nov 10 '11 at 21:08
  • one time filling in the credentials like DOMAIN\username and giving tha pass should be enough for the entire VS session. When you restart VS it needs to be logged in again. – kroonwijk Nov 10 '11 at 21:16
  • The credentials are simply ignored (the dialog immediately reappears), which is why I'm thinking there may be a company firewall issue at play... although I am able to do things like browse the VS Extensions Gallery, so I'm not sure. – Adrian Nov 11 '11 at 16:59
  • Did you look at the **request** in fiddler and verify that the credentials aren't being passed? – davidfowl Nov 28 '11 at 06:20
  • I'm not sure how to look at the request in fiddler. I've updated the original post to show what fiddler displays after several attempted logins. (Sorry for the delayed response, was out for a few weeks) – Adrian Dec 08 '11 at 00:22

1 Answers1

2

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

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
superkinhluan
  • 733
  • 7
  • 23
  • Yeah, I tried that solution too. I put our TFS server into the allowed Intranet Sites but it had no effect. I honestly think it's a company firewall issue. – Adrian Nov 11 '11 at 17:01