Github速度太慢 new方案

Github速度太慢全网最全方案

近日,我在Github上下载源码,真的鸡肋,慢的一匹,通过以下方式,让我下载Github速度飞快,因为刚好有代理,就用的第一种方式,而后面几种方式参考自网上的一些方案,自己也尝试了一下,有点用,就贴出来,给大家提升一下工作效率,如果您也有类似的问题,欢迎转发,收藏~同时,欢迎留言区写下自己用过或者本文没有提到的方案,一起完善~

1.有代理

只需要针对github设置代理即可,这里以ss为例子:

 
  1. #只对github.com

  2. git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

  3.  
  4. #取消代理

  5. git config --global --unset http.https://github.com.proxy

接下来,享受速度的体验吧。

2.没代理

2.1 没关系,换URL

我们可以使用github的镜像网站,

github.com.cnpmjs.org

github.com替换为上述URL即可,然后去clone,速度飞快!

例如:

 git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose  会慢到吐血。

git clone https://github.com.cnpmjs.org/CMU-Perceptual-Computing-Lab/openpose   ,把github.com 替换为github.com.cnpmjs.org 之后,瞬间完成下载。

2.2 配置Hosts

在ipaddress中查找github.com与github.global.ssl.fastly.net对应的ip,配置到hosts即可。

https://www.ipaddress.com/

 
  1. xxxx github.global.ssl.fastly.net

  2. xxxx github.com

例如:Ubuntu上在/etc/hosts中添加:

 
  1. 151.101.72.249 github.http://global.ssl.fastly.net

  2. 140.82.113.4 github.com

猜你喜欢

转载自blog.csdn.net/u010451780/article/details/111168200