Search code examples
proxyazure-devopsbuild-agentazure-devops-self-hosted-agent

VSTSNuGetPush.exe Proxy Settings


I have installed and configured an on-premise VSTS agent behind a corporate firewall. At first, the Nuget tasks were failing with connection related errors, but I fixed this using the HTTP_PROXY and HTTPS_PROXY environment variables. However, the Nuget Push task ( VSTSNuGetPush.exe ) is still failing with a connection related error, and I need to establish exactly how it expects proxy information to be configured?

From the VSTS logs, the actual error message is:

2018-06-21T11:28:25.6945523Z System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 13.107.6.175:443

I'm not sure if it complicates things, but the first step in the release is a Nuget Tool Installer of 4.6.2 to ensure semantic versioning 2.0 is supported.

Any help greatly appreciated!


Solution

  • There isn't any way to achieve this for now.

    As a workaround, you can add a variable "NuGet.ForceNuGetForPush" in your build definition and queue the build with its value set to true. This will force the task to use nuget.exe to push the package which should read the proxy settings.