Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget + NuGetPowerTools + Enable-PackageRestore = authentication failure behind Proxy

Tags:

nuget

Last night, at home, where I do not work with a proxy, updated a NuGet repository using NuGetPowerTools / Enable-PackageRestore. Worked great.

Came into the office, where i am working with the same Repository under the following conditions:

  • in a VMWare based VM,
  • using Bridged Networking,
  • Reinstalled NuGet today, restarted (to be sure I have latest version)
  • runnning under an account in a DEV Domain (ie, DEV\Me)
  • Accessing the outer world via a Proxy that requires a corp Domain Account (ie, CORP\Me)
  • Ie 9's Configuration/Internet Options/Connection is setup as:
    • Use Proxy:
    • Address: yadayada1
    • Port: 80
    • Bypass proxy for local addresses
    • Automatically detect Settings
  • Above settings are correct in as much that I can access the web via IE9, Chrome, etc.
    • NOTE: Can list and download Nuget packages...it's just the new Build process that can't.
  • As per suggestion on the web I have looked at DevEnv.exe.config and have the following settings: -<system.net><settings><ipv6 enabled="true" /></settings></system.net>
    • I also tried with these settings as
    • <system.net><defaultProxy useDefaultCredentials="true"><proxy autoDetect="True" usesystemdefault="True" /></defaultProxy></system.net> so that DevEnv.exe falls back for to same connection settings that IE 9 is using. Didn't do it.

What I get for all this is:

------ Build started: Project: XAct.Core, Configuration: Debug Any CPU ------ Please provide proxy credentials: UserName: Password: C:_Workspaces\XAct\CS.FF.XAct.Lib2.nuget\NuGet.targets(43,9): error : Cannot read keys > when either application does not have a console or when console input has been redirected > from a file. Try Console.Read. C:_Workspaces\XAct\CS.FF.XAct.Lib2.nuget\NuGet.targets(43,9): error MSB3073: The command ""C:_Workspaces\XAct\CS.FF.XAct.Lib2.nuget\nuget.exe" install "C:_Workspaces\XAct\CS.FF.XAct.Lib2\XAct.Core\XAct.Core\packages.config" -source "" -o "C:_Workspaces\XAct\CS.FF.XAct.Lib2\packages"" exited with code 1.

Found (but unfortunately lost again) a thread somewhere on the net where I saw NuGet developers thrashing it out -- referring to downloading the latest build from their TeamCity (which I could not access/join) -- but the thread did not clearly say Eureka! at the bottom.

Thanks.

like image 406
Ciel Avatar asked Nov 17 '11 22:11

Ciel


1 Answers

Reiterating what Sky and Pranav mentioned - this issue seems to be fixed in NuGet 1.7 - see http://nuget.codeplex.com/workitem/1655:

pranavkm wrote Jan 31 at 8:17 PM

Fixed in changeset 6c156e0dc214

like image 191
Matthew Skelton Avatar answered Oct 21 '22 19:10

Matthew Skelton