Forum Discussion

vijit-devops's avatar
vijit-devops
Copper Contributor
Jul 18, 2022

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_l995's avatar
    Yun_l995
    Copper 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-devops's avatar
    vijit-devops
    Copper Contributor

    Solution :

     

    $env:http_proxy = "<http://proxy-URL>"
    [net.webrequest]::defaultwebproxy = new-object net.webproxy "http://<proxy-URL>"
    [system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true

Resources