Nuget proxy usage
Dear Teamcity team,
We have a problem regarding the use of proxies when using nuget in the Teamcity. If you add the proxy server data to the nuget.config configuration file via the terminal or command line, downloading dependencies will come through the proxy server. But using the same configuration file inside the Teamcity CI system downloading dependencies does not happen through a proxy but directly. Used configuration is below:
- Set up proxy server on TeamCity ci agent
teamcity.http.proxyHost=ip_address_of_proxy
teamcity.http.proxyPort=port_number
teamcity.https.proxyHost=ip_address_of_proxy
teamcity.https.proxyPort=port_number
teamcity.http.nonProxyHosts=localhost|<teamcity_server_ip>
teamcity.https.nonProxyHosts=localhost|<teamcity_server_ip>
-
Set up proxy server for nuget
*) > nuget.exe config -set http_proxy=http://ip_address_of_proxy:port_number
*) > nuget.exe config -set https_proxy=http://ip_address_of_proxy:port_number -
Run Build
Please sign in to leave a comment.
In that case, it would not be possible to specify a custom location of the NuGet.config file in the build settings because due to this bug https://github.com/NuGet/Home/issues/747, NuGet respects only the proxy settings from the config file of the current user. The solution is to either set the proxy in the config file of the user that starts the build agent or apply a workaround from the linked issue.