家里的宽带访问github非常慢,git clone一直维持在10k/s,这个速度实在难以接受。

试探性的搜了一下git代理,没想到还真有。。。

设置方法

# 设置代理
git config --global http.proxy ''socks5://127.0.0.1:1080''
git config --global https.proxy ''socks5://127.0.0.1:1080''

# 取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy

或者

# 只对github.com代理
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
# 取消代理
git config --global --unset http.https://github.com.proxy)
最后修改:2018 年 12 月 16 日
如果觉得我的文章对你有用,请随意赞赏