0

I am trying to configure a build agent to work with a proxy as per the documentation.

Using VSTS Agent behind Proxy

.proxy set and being picked up, envriomental variables set but for some reason only the username is coming throuhg the password is left as undefined no matter how i set it. config.cmd, .env file , user variables.

Agent.ProxyUrl=http://proxy:8888
Agent.ProxyUsername=Domain\Username
Agent.ProxyPassword=undefined
RickWeb
  • 1,765
  • 2
  • 25
  • 40
  • From the ticket tag, it seems that you are using TFS 2018, right? You could check if the agent version is v2.122.0. This version of the agent has known issues. Here is [a doc](https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/proxy?view=azure-devops&tabs=windows) about it. You could try to download the newer version of the agent and check if it could work. https://github.com/microsoft/azure-pipelines-agent/tags?after=v2.136.0 – Kevin Lu-MSFT Nov 04 '20 at 05:53
  • @KevinLu-MSFT the build agent is 2.136.1 – RickWeb Nov 04 '20 at 11:52
  • @KevinLu-MSFT you are correct TFS2018 , as above version 2.136.1 of the agent, I might try downloading the atleast agent. Do you know if its supported by TFS2018? – RickWeb Nov 04 '20 at 12:03
  • 1
    According to the document above, TFS 2018 supports this feature. – Kevin Lu-MSFT Nov 05 '20 at 05:36

1 Answers1

0

not sure of your setup above, but according to the overview you pointed out you need to

  1. Create a .proxy file in the agent's root containing only the proxy URL
  2. Then you need 2 environment variables VSTS_HTTP_PROXY_USERNAME and VSTS_HTTP_PROXY_PASSWORD

I've had success with this setup, in fact I also used a proxy environment variable before, but can't find the exact name now.

Niel Zeeman
  • 659
  • 5
  • 11
  • I have set all that, it's very strange, I have even removed the agent and reconfigured it using ./config.cmd --proxyurl http://127.0.0.1:8888 --proxyusername "myuser" --proxypassword "mypass" – RickWeb Nov 03 '20 at 18:22