git設置代理
一. git 設置http代理
1.設置代理 http/https協議(clone https://前綴的repo會走ss)
git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global https.proxy 'socks5://127.0.0.1:1080'
會在~/.gitconfig下加上對應代理
2.git@github.com走的是ssh協議,所以配置ssh代理
配置.ssh/config (確保安裝了 NetCat)
Host github.com bitbucket.org
ProxyCommand nc -x 127.0.0.1:1080 %h %p
浙公網安備 33010602011771號