Posted on

Socks

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

It can be quite useful for Chinese users who use proxy agents like SSR, in the advanced settings, you will find the address and port for your local socks server started by SSR. In my case, the port is 1086.

HTTP/HTTPS

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

Unset

git config --global --unset http.proxy
git config --global --unset https.proxy

References

  1. https://tech.codefog.com/2018/setting-git-proxy/

Leave a Reply

Your email address will not be published. Required fields are marked *