Teamcity (8.1.5) behind proxy unable to connect to nuget feed

I have installed teamcity on a VM, which uses proxy to connect to the outside world. I have applied the settings as mentioned in the below post, but still face the problem,

The error this time is as below,

Failed to fetch latest NuGet from default feed.
Failed to connect to Bad Request

Can someone please help me out here? been struggling with this from last 3 days, unable to fetch Nuget command line exe.
I need this to build our solution as it uses several Nuget packages.

By the way, our proxy url set up in the IE LAN settings is something like below,

I have setup parameters for teamcity server as below in teamcity-server.bat,

SET TEAMCITY_SERVER_OPTS=%TEAMCITY_SERVER_OPTS% -Dproxyset=true -Dhttp.proxyPort=7070 -Dhttp.nonProxyHosts="" -Dhttps.proxyPort=7070 -Dhttps.nonProxyHosts=""

Whenever I tried to modify this .bat file, the service restart hangs and untill I restart the whole machine, it will not come back to the stable state.


Comment actions Permalink

Hi Santhosh,

This specific dialog and message is about adding a new NuGet binary and instead of direct download of NuGet distribution you can download it locally and upload using "Upload NuGet" action on the form.
This seems easier then trying to configure a proxy. If you still need a proxy for the download action to work, please details why is that important.

Comment actions Permalink

Thanks for the quick response.
I just wanted to avoid the upload of latest Nuget package everytime.

How can I get the Nuget distributable? I tried, it asks me to do it through visual studio package manager, but that will install the binaries into the solution. I need .nupkg to upload into teamcity "Upload Nuget".
Please advise how do I do that? And where to get the distributable.

And out of curiosity, what will someone do if they want to do it through proxy?

Best Regards,

Comment actions Permalink

You can download NuGet.Commandline.<VERSION>.nupkg file using the direct link, for example

Now there is no proxy support for the NuGet download action. "NuGet Upload" was implemented as current workaround. If need to upload NuGet through proxy, then feel free to create a feature request in our tracker and please describe your use case in details.

Comment actions Permalink

Thank you, issue sorted. i will not waste more time to fix the proxy thing.


Please sign in to leave a comment.