Getting Git to work with a proxy server - fails with “Request timed out”

前端 未结 19 2836
旧时难觅i
旧时难觅i 2020-11-22 05:09

How do I get Git to use a proxy server?

I need to check out code from a Git server, but it shows \"Request timed out\" every time. How do I get around this?

19条回答
  •  暖寄归人
    2020-11-22 05:45

    For the git protocol (git://...), install socat and write a script such as:

    #!/bin/sh
    
    exec socat - socks4:your.company.com:$1:$2
    

    make it executable, put it in your path, and in your ~/.gitconfig set core.gitproxy to the name of that script.

提交回复
热议问题