Git 克隆加速 代理设置

842 阅读1分钟

从某些仓库克隆代码巨慢,甚至很容易失败,所以设置代理非常有必要。

设置代理:

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

git config --global https.proxy https://127.0.0.1:1086

git config --global http.proxy 'socks5://127.0.0.1:1086' 

git config --global https.proxy 'socks5://127.0.0.1:1086'

取消代理:

git config --global --unset http.proxy

git config --global --unset https.proxy