Proxy Support

Developer
Aug 11, 2011 at 11:56 PM
Edited Aug 17, 2011 at 1:29 PM

Hey all,

Thanks to ilya, nuget has proxy and basic auth support. It would be great if we can get people to try out the build here:

EDIT

Please grab a build from the latest successful 1.5 branch:

http://ci.nuget.org:8080/viewLog.html?buildTypeId=bt23&buildId=lastSuccessful

Go to the artifacts tab and install the VisualStudioAddIn

Respond to this discussion if you have any errors or if it's working great in your environment.

Thanks.

Aug 12, 2011 at 12:52 AM

Hi.

I tried this as I am having issues with nuget via proxy and it still is not working.

 

I still get the following:

 

could not connect to the feed specified at "http://packages.nuget.oft/v1/FeedService.svc". Please verify that the packages source .... etc.

Aug 12, 2011 at 1:02 AM

News flash... nuget works when I have Fiddler open!

Aug 12, 2011 at 1:23 AM

I think we've seen a number of mentions before where fiddler makes things work. e.g. http://nuget.codeplex.com/workitem/1318. But I'm not sure we know why :)

Developer
Aug 12, 2011 at 2:07 AM
Edited Aug 12, 2011 at 8:01 AM

Can you try using wireshark(http://www.wireshark.org/download.html) and filtering only http traffic. Fiddler is no good here since it is a proxy. We need to see what's happening under the hood.

Aug 12, 2011 at 9:49 AM

I tried the build linked in the first post and it seems working on my environment (I'm behind a basic-authenticated proxy).

I've installed several packages by searching them thru the Package Manager UI.

Should I test some other use cases ?

Thank you
Igor.

Developer
Aug 12, 2011 at 9:56 AM

As much as you can and help spread the word :).

Thanks

Aug 14, 2011 at 4:01 PM

Seemed to work great for me.  

Aug 15, 2011 at 7:19 PM

I'm getting the following error:

Install-Package : Expected an absolute, well formed http URL without a query or fragment.
Parameter name: serviceRoot
At line:1 char:16
+ install-package <<<<  glimpse.mvc3
    + CategoryInfo          : NotSpecified: (:) [Install-Package], ArgumentException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Developer
Aug 15, 2011 at 7:27 PM

@rickysupit:

Can you do 2 things:

  1. Can you try a newer build.
  2. Open fiddler (or download if you don't have it http://www.fiddler2.com/fiddler2/), capture the requests for Install-Package, and post them here.
Aug 15, 2011 at 8:20 PM

I get 401 when redirected to our internal gateway that required ntlm auth.  Here's the result after replacing our host name, url,, auth header.  Please ping me directly if you need more detail info.

#    Result    Protocol    Host    URL    Body    Caching    Content-Type    Process    Comments    Custom   
3    200    HTTP    CONNECT    go.microsoft.com:443    0            devenv:5420           
4    302    HTTP    packages.nuget.org    /v1/FeedService.svc/    2,881    no-cache      text/html    devenv:5420           
5    401    HTTP    webgateway.domain.com:8080    /somepath/defghij/plugin?target=Auth&reason=Auth&setCookie=true&cookiePrefix=MWG_Auth&cookieSize=32768&ttl=360&url=<encodedurl>    3,076    no-cache      text/html    devenv:5420           
6    302    HTTP    packages.nuget.org    /v1/FeedService.svc/    2,881    no-cache      text/html    devenv:5420           
7    401    HTTP    webgateway.domain.com:8080    /somepath/defghij/plugin?target=Auth&reason=Auth&setCookie=true&cookiePrefix=MWG_Auth&cookieSize=32768&ttl=360&url=<encodedurl>    3,076    no-cache      text/html    devenv:5420           
8    401    HTTP    webgateway.domain.com:8080    /somepath/defghij/plugin?target=Auth&reason=Auth&setCookie=true&cookiePrefix=MWG_Auth&cookieSize=32768&ttl=360&url=<encodedurl>    3,076    no-cache      text/html    devenv:5420           
9    302    HTTP    webgateway.domain.com:8080    /somepath/defghij/plugin?target=Auth&reason=Auth&setCookie=true&cookiePrefix=MWG_Auth&cookieSize=32768&ttl=360&url=<encodedurl>    2,676    no-cache      text/html    devenv:5420           
10    302    HTTP    packages.nuget.org    /somepath/defghij/plugin?target=Auth&reason=Land&setCookie=<myencriptedcookie>&cookiePrefix=MWG_Auth&url=<encodedurl>    2,676    no-cache      text/html    devenv:5420           
11    302    HTTP    packages.nuget.org    /v1/FeedService.svc/    2,881    no-cache      text/html    devenv:5420           
12    302    HTTP    webgateway.domain.com:8080    /somepath/defghij/plugin?target=Auth&reason=Auth&setCookie=true&cookiePrefix=MWG_Auth&cookieSize=32768&ttl=360&url=<encodedurl>    2,676    no-cache      text/html    devenv:5420           

Developer
Aug 15, 2011 at 9:29 PM

So you tried the new build and didn't get prompted?

Aug 15, 2011 at 9:48 PM

Yes.  I uninstalled the build from the top post then installed the version above. Did not get any prompt, and return the same error message.

Package Manager Console Host Version 1.5.20813.124
Aug 16, 2011 at 12:29 PM

I'm working behind a proxy that requires username/password to be entered. I've just tried this with the build from the link at the top (1.5.20810.114) and I'm getting prompted for a password, I can then see the feed list, search, and install packages. I've tried this with and without fiddler (works well in both cases). The only odd thing I am seeing, is that sometimes it will correctly download package icons, and sometimes it will fail with 407. I can't seem to see a pattern - the closest, but not consistent, is that the first request on a page of results succeeds, but subsequent ones fail.

Hope this helps
Matt 

Developer
Aug 16, 2011 at 9:44 PM

Ok guys there's a new build available. Try it out and let me know if it works.

Aug 17, 2011 at 4:28 AM

How do I actually install this new build?

I've tried to uninstall my current version of Nuget from Extensions Manager but the option to uninstall is greyed out.

When I try to install the new vsix package I get the following error:

17/08/2011 2:20:47 PM - Microsoft Visual Studio Extension Installer
17/08/2011 2:20:47 PM - -------------------------------------------
17/08/2011 2:20:47 PM - Initializing Install...
17/08/2011 2:20:48 PM - Extension Details...
17/08/2011 2:20:48 PM - 	Identifier      : NuPackToolsVsix.Microsoft.67e54e40-0ae3-42c5-a949-fddf5739e7a5
17/08/2011 2:20:48 PM - 	Name            : NuGet Package Manager
17/08/2011 2:20:48 PM - 	Author          : Outercurve Foundation
17/08/2011 2:20:48 PM - 	Version         : 1.5.20815.128
17/08/2011 2:20:48 PM - 	Description     : A collection of tools to automate the process of downloading, installing, upgrading, configuring, and removing packages from a VS Project.
17/08/2011 2:20:48 PM - 	Locale          : en-US
17/08/2011 2:20:48 PM - 	MoreInfoURL     : http://docs.nuget.org/
17/08/2011 2:20:48 PM - 	InstalledByMSI  : False
17/08/2011 2:20:48 PM - 	MinFramework    : 4.0
17/08/2011 2:20:48 PM - 	MaxFramework    : 4.0
17/08/2011 2:20:48 PM - 
17/08/2011 2:20:48 PM - 	Supported Visual Studio Editions : 
17/08/2011 2:20:48 PM - 		Version : 10.0
17/08/2011 2:20:48 PM - 			Pro
17/08/2011 2:20:48 PM - 			IntegratedShell
17/08/2011 2:20:48 PM - 
17/08/2011 2:20:48 PM - 	Supported Isolated Shells : 
17/08/2011 2:20:48 PM - 
17/08/2011 2:20:48 PM - 	References      : 
17/08/2011 2:20:48 PM - 
17/08/2011 2:20:48 PM - Searching for applicable products...
17/08/2011 2:20:48 PM - Found installed product - Microsoft Visual Studio 2010 Ultimate
17/08/2011 2:20:48 PM - The extension will be upgraded from version 1.2.20325.9034.
17/08/2011 2:20:49 PM - The following target products have been selected...
17/08/2011 2:20:49 PM - 	Microsoft Visual Studio 2010 Ultimate
17/08/2011 2:20:49 PM - 
17/08/2011 2:20:49 PM - Verifying matching extension signatures before updating...
Installed Extension Path: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\
Update Extension Path: c:\temp\nuget.tools.vsix
17/08/2011 2:20:49 PM - VSIXInstaller.SignatureMismatchException: The installed version of 'NuGet Package Manager' is signed, but the update version is not signed. Therefore, Extension Manager cannot install the update.
   at VSIXInstaller.Common.VerifyMatchingExtensionSignatures(IInstalledExtension installedExtension, IInstallableExtension updateExtension)
   at VSIXInstaller.InstallProgressPage.BeginInstallVSIX(SupportedVSSKU targetAppID)
17/08/2011 2:20:49 PM - Install Error : VSIXInstaller.SignatureMismatchException: The installed version of 'NuGet Package Manager' is signed, but the update version is not signed. Therefore, Extension Manager cannot install the update.
   at VSIXInstaller.Common.VerifyMatchingExtensionSignatures(IInstalledExtension installedExtension, IInstallableExtension updateExtension)
   at VSIXInstaller.InstallProgressPage.BeginInstallVSIX(SupportedVSSKU targetAppID)
Aug 17, 2011 at 4:46 AM

Run VS as admin to uninstall it.

Aug 17, 2011 at 7:40 AM

Working as before - can browse, search + download just fine, but still seeing inconsistent 407 failures with icons. Weirdly, when I get a 200 error on an icon, no credentials have been passed through (according to fiddler) so I don't know how they're succeeding in the first place.

Developer
Aug 17, 2011 at 9:16 AM

We're looking at fixing the icon problem for 1.6 (http://nuget.codeplex.com/workitem/1344).

Developer
Aug 17, 2011 at 1:29 PM

Please grab a build from the latest successful 1.5 branch:

http://ci.nuget.org:8080/viewLog.html?buildTypeId=bt23&buildId=lastSuccessful

Go to the artifacts tab and install the VisualStudioAddIn

Aug 17, 2011 at 1:56 PM
dfowler wrote:

Please grab a build from the latest successful 1.5 branch:

http://ci.nuget.org:8080/viewLog.html?buildTypeId=bt23&buildId=lastSuccessful

Go to the artifacts tab and install the VisualStudioAddIn

I'm still getting the same error message and no prompt.

Developer
Aug 17, 2011 at 8:23 PM

@rickysupit, we're constantly making fixes so keep trying.

Sep 9, 2011 at 3:40 PM

Dave, The latest drop works from behind our corporate gateway.  Thanks for the fix.

Sep 23, 2011 at 4:28 AM

Not working for me - just installed 1.5.20902.9026 and getting the prompt for login to go.microsoft.com. Works if I have fiddler2 running.

Sep 26, 2011 at 8:43 AM

Same here. I'm behind a proxy and everything worked fine before the last update.

How can I get everything working again?

Sep 29, 2011 at 10:30 AM

Same here using NuGet.exe 1.5.20905.5

Using 1.4 with proxy specified in IE settings when installing a package NuGet would automatically forward a Proxy-Authorization header following a 407 response from our ISA proxy.

Using 1.5 immediately following the 407 response NuGet issues a request for credentials. Unfortunately I cannot browse the source on Codeplex to track this down at this time.

Adding a system.net/defaultProxy section specifying useDefaultCredentials="true" to nuget.exe.config did not resolve the issue.

 

This has caused issues in our CI environment as 1.5 will now check package dependencies for packages listed in packages.config contact the repositories. We have rolled back to 1.4 until we can resolve.

Is this change in behaviour intentional?

Developer
Sep 29, 2011 at 10:36 AM
Edited Sep 29, 2011 at 10:36 AM

Try using 1.6 we had a regression with proxy support in 1.5. 

http://ci.nuget.org:8080/repository/download/bt4/2267:id/VisualStudioAddIn/NuGet.Tools.vsix

It'll help us figure out if we really fixed it.

Oct 6, 2011 at 5:50 PM

Just for your information. I use Privoxy (privoxy.org). To avoid this issue add the line:
.nuget.org

to the { -block } section of your user.action file.