All of a sudden, our build agent could no longer communicate with Azure. A failed network change forced us to set a proxy server manually. While most browsers use the system proxy, the build agent did not.
For the build agent you need to create a .proxy file with the proxy URL in the root directory of your agent. Let us look how you can do that.
- Locate the root directory of your build agent (this is the folder that contains the run.exe and the _work folder).
- Open a Command Prompt at this location.
- Type this command, but replace PROXYIP & PORT with your values:
1echo http://PROXYIP:PORT > .proxy - Check that your .proxy file is created at the right place:
- Optional: If your proxy needs authentication, you must set these environment variables:
12set VSTS_HTTP_PROXY_USERNAME=userset VSTS_HTTP_PROXY_PASSWORD=password - Restart the service for your build agent.
Your build agent should now connect to Azure and work as expected.
When you know that you need a proxy at the time of the installation, you can configure the proxy settings right when you call config.cmd:
1 |
./config.cmd --proxyurl http://127.0.0.1:8888 --proxyusername "user" --proxypassword "password" |
So, “.proxy” should contains only one row with proxy address?
If the username/password contains a special chars like “%” should be converted to “%25”?
Hi ALexander,
As far as I know there should only be one line in the .proxy file. I would try the passwort first without the escape sequence for special chars, but I have no experience with proxies that require authentication.
Regards,
Johnny