首页 > 其他 > 详细

github 代理加速或 CDN 加速

时间:2021-06-04 12:12:51      阅读:13      评论:0      收藏:0      [点我收藏+]

下面的命令只针对github.com,在国内还可能会用到gitee.com,所以不能将所有的 git 站点都添加上代理。

# 设置代理
git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
# 取消代理
git config --global --unset http.https://github.com.proxy

如果没有代理也不要急,有专门的cdn加速:

git config --global url."https://ghproxy.com/https://github.com".insteadOf "https://github.com" 

或者:

git config --global url."https://hub.fastgit.org/".insteadOf "https://github.com/"

cdn 加速二选一使用。

但因为没有官方 CDN,上面两个都是用爱发电,没准哪天就挂了。

github 代理加速或 CDN 加速

原文:https://www.cnblogs.com/thepoy/p/14848080.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!