美文网首页
解决git clone速度太慢的问题

解决git clone速度太慢的问题

作者: 安哥拉的赞礼 | 来源:发表于2020-02-29 13:42 被阅读0次

git的网络配置文件在如下位置


假设你已经有了ss(我开PAC是OK的)

在cmd中输入以下指令:

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

(端口号看你自己的配置,一般都是1080)

如果要取消代理修改:

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

问题补充
上述方法挂了全局代理,但是如果要克隆码云、coding等国内仓库,速度就会很慢。更好的方法是只对github进行代理,不会影响国内仓库:

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

代理后git clone速度真的快了很多~我这边能到1MB/s以上
原文链接:https://blog.csdn.net/qq_37409292/article/details/83005919

相关文章

网友评论

      本文标题:解决git clone速度太慢的问题

      本文链接:https://www.haomeiwen.com/subject/xayphhtx.html