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

Hi,
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,

https://devnet.jetbrains.com/message/5452590#5452590

The error this time is as below,

Failed to fetch latest NuGet from default feed.
Failed to connect to http://packages.nuget.org/api/v1/FeedService.svc. 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,

http://proxyuk.mycompany.xx.com:7070/proxy.pac

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

SET TEAMCITY_SERVER_OPTS=%TEAMCITY_SERVER_OPTS% -Dproxyset=true -Dhttp.proxyHost=proxyuk.mycompany.xx.com -Dhttp.proxyPort=7070 -Dhttp.nonProxyHosts="mycompany.xx.com" -Dhttps.proxyHost=proxyuk.mycompany.xx.com -Dhttps.proxyPort=7070 -Dhttps.nonProxyHosts="mycompany.xx.com"

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.

Thanks,
Santhosh.

4 comments
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.

0
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,
Santhosh.

0
Comment actions Permalink

You can download NuGet.Commandline.<VERSION>.nupkg file using the direct link, for example http://nuget.org/api/v2/package/NuGet.CommandLine/2.8.3/.

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.

0
Comment actions Permalink

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

0

Please sign in to leave a comment.