1、需要安装个代理,可以某宝买,也可以用免费的。推荐一个比较稳定的免费代理:http://poro.ws。具体安装方式以官网为准。
2、设置git代理(我的代理服务安装在192.168.1.102,默认端口1080)
git config –global https.proxy http://192.168.1.102:1080
git config –global https.proxy https://192.168.1.102:1080
git config –global http.proxy ‘socks5://192.168.1.102:1080’
git config –global https.proxy ‘socks5://192.168.1.102:1080’
3、取消git代理
git config –global –unset http.proxy
git config –global –unset https.proxy
4、实测速率(付费的代理会更快)
5、增加git全局镜像代理
git config –global url.”https://gitclone.com/github.com”.insteadOf https://github.com