1、关闭代理再重启
git config --global --unset http.proxy
git config --global --unset https.proxy
添加全局代理:
git config --global http.proxy
git config --global https.proxy
2、更改ip
首先通过下面网站获取git ip
https://ipaddress.com/website/github.comhttps://ipaddress.com/website/github.com
sudo gedit /etc/hosts
C:\Windows\System32\drivers\etc
然后根据自己的系统在上面的文件中加入
140.82.112.4 github.com