So I think what I want is the opposite of this post: VSTS NuGet restore fails (proxy?)
We have an on-prem machine running a VSTS agent for builds. That machine has the http_proxy variable set so the agent process can talk to VSTS in the cloud.
I'm then trying to use the built in nuget task to do a nuget restore, but the feed I want to access is on an on-prem artifactory instance. To access this feed nuget needs to not use the proxy settings that the agent does (we have the 'bypass proxy for local addresses' option checked in Internet Options).
However, when I run the nuget task I see the following in my build log, it seems to set the nuget proxy to the agent proxy:
2017-10-17T14:02:14.4961204Z ##[debug]agent.proxyurl=http://X.X.X.X:8080
2017-10-17T14:02:14.4961204Z ##[debug]agent.proxyusername=undefined
2017-10-17T14:02:14.6992455Z ##[debug]agent.proxypassword=undefined
2017-10-17T14:02:14.7773706Z ##[debug]Adding environment variable for NuGet proxy: http://X.X.X.X:8080/
2017-10-17T14:02:14.7773706Z ##[debug]exec tool: C:\vsts-agent\_work\_tool\NuGet\4.0.0\x64\nuget.exe
(The 2 sets of X.X.X.X are identical in the real log)
I've tried setting a process variable of http_proxy=""
and adding this line to my nuget.config <add key="http_proxy" value="" />
, but it makes no difference.
Is there a way to run the nuget task without picking up the agent proxy?
If I just run nuget manually from a command line task in VSTS, it all works as expected.