分辨需要设置的代理
- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone git@github.com:owner/git.git
一、HTTP 形式
走 HTTP 代理
git config --global http.proxy "http://127.0.0.1:8080"
git config --global https.proxy "http://127.0.0.1:8080"
走 socks5 代理(如 Shadowsocks)
git config --global http.proxy "socks5://127.0.0.1:1080"
git config --global https.proxy