好好学习 天天向上

github 设置代理或 CDN 加速

# 设置代理

##使用socks5代理(推荐)
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
##使用http代理(不推荐)
git config --global http.https://github.com.proxy http://127.0.0.1:1080

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

# 设置cdn加速

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

posted on 2025-02-08 16:48  ioto  阅读(1314)  评论(0)    收藏  举报

导航