明明用了梯子一直显示下载失败,查了资料有发现git clone要设置代理
我用的是clash,端口号是7890,输入
只对github进行代理
git config --global http.https://github.com.proxy http://127.0.0.1:7890
git config --global https.https://github.com.proxy http://127.0.0.1:7890
或者:
git config --global http.https://github.com.proxy socks5://127.0.0.1:7890
git config --global https.https://github.com.proxy socks5://127.0.0.1:7890
取消代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
查看已经有的代理:
git config --global -l
如果还不行在试一下更改DNS为8.8.8.8