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

前端 未结 19 2459
旧时难觅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:43

    If you have tsocks or proxychains installed and configured, you can

    $ tsocks git clone 
    

    or

    $ proxychains git clone 
    

    to make it shorter, I created a symbol link /usr/bin/p for proxychains, so I can use it like this

    p git clone 
    

    and I can use it to proxy any command,

    p 
    

    by the way, proxychains is not updated for a long time, you may wanna try proxychians-ng

提交回复
热议问题