Using a socks proxy with git for the http transport

前端 未结 7 1953
臣服心动
臣服心动 2020-11-28 00:48

How to make git use a socks proxy for HTTP transport?

I succeed in configuring git with GIT_PROXY_COMMAND to use a socks proxy for GIT transport.

Also, I hav

7条回答
  •  隐瞒了意图╮
    2020-11-28 01:20

    (Just a little reminder) If you want the hostname also be resolved by the proxy (that means passing everything through the proxy), especially when you are cloning a gist, you can use the following setting (the key is that it uses socks5h instead of socks5):

    git config --global http.proxy socks5h://127.0.0.1:1080
    

提交回复
热议问题