由于github是外国网站,所以访问速度堪忧,以下是自己觉得好用的可以提高gihub clone和访问速度的方法:
1.使用代理
- 1.你需要知道你本地的socks5代理ip地址和端口。例如。127.0.0.1端口1080。
在windosw下可以使用
netstate指令查看活跃ip,可以知道自己的代理ip。 - 2.使用命令设置:
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
2.clone时使用cnpmjs.org
在clone大项目的时候,我们可以使用cnpmjs.org镜像来提高clone速度,如https://github.com/xxx/xxx.git改成https://github.com.cnpmjs.org/atdow/sinokit.git,这样可以极大地提高clone速度。
但是出现
error: RPC failed; curl 18 transfer closed with outstanding read data remaining,即curl的postBuffer的默认值太小,暂时无法解决(不能使用git config --global http.postBuffer 524288000来解决)
3.安装“GitHub加速”谷歌插件
在谷歌市场搜索并安装“GitHub加速”插件,可以大大提高github的访问速度