git一直失败,不是Timed out 就是connection refused,记录下自己的解决方法
解决方案:配置代理
注意:最后那个 url 改成自己的代理地址和端口
我是ClashX,在这里查看,我的端口是7890
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
补充:
撤销代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
查当前的代理配置,分别是:
git config --global --get http.proxy
git config --global --get https.proxy