Forum Discussion
vijit-devops
Jul 18, 2022Copper Contributor
How to git clone in azure devops build agent ?
Hi All,
I am trying to git clone azure git repository in azure devops build agent
Using command line script as a stage.
Azure DevOps is On-premises and using windows build agent.
But getting the error : fatal: unable to access 'https://<devops-url>/<project-name>/_git/<repo-name>/': Failed to connect to <DevOps-url>port 443: Timed out
Please let me know on this.
- Yun_l995Copper Contributor
vijit-devops Hi, did you get a solution to this failed git error? I'm encountering same issue now, can yu post any solution you found useful?
- vijit-devopsCopper ContributorSolution posted below
- vijit-devopsCopper Contributor
Solution :
$env:http_proxy = "<http://proxy-URL>"
[net.webrequest]::defaultwebproxy = new-object net.webproxy "http://<proxy-URL>"
[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true