ctrlC & ctrlV

我们不生产代码,我们只是代码的搬运工~

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2020.4.23 更新一版,下边的方法都不好用了,可以使用新发现的方法。

github加速器 (不想装插件用网页)

chrome插件 (用插件后直接多了一个按钮,用按钮中的地址拉取代码就行)

 

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

这几天克隆下载GitHub代码奇慢无比,网上搜索了一下解决方案有些不太完整,自己试验出了比较完整的解决方式:

1、在hosts文件里追加以下内容(IP需要替换掉),以下几个域名一个都不要少,有些文章只写了一部分,我一开始就少了个github.com,结果速度就还是很慢。

# GitHub Start
140.82.114.4 github.com
192.30.255.119 gist.github.com
185.199.110.153 assets-cdn.github.com
151.101.228.133 raw.githubusercontent.com
151.101.228.133 gist.githubusercontent.com
151.101.228.133 cloud.githubusercontent.com
151.101.228.133 camo.githubusercontent.com
151.101.228.133 avatars0.githubusercontent.com
151.101.228.133 avatars1.githubusercontent.com
151.101.228.133 avatars2.githubusercontent.com
151.101.228.133 avatars3.githubusercontent.com
151.101.228.133 avatars4.githubusercontent.com
151.101.228.133 avatars5.githubusercontent.com
151.101.228.133 avatars6.githubusercontent.com
151.101.228.133 avatars7.githubusercontent.com
151.101.228.133 avatars8.githubusercontent.com
185.199.109.154 github.githubassets.com
151.101.109.194 github.global.ssl.fastly.net
# GitHub End

2、IP替换方法,打开 http://tool.chinaz.com/dns ,查询域名IP映射,把以上5个域名挨个查询一下,找一个TTL值比较小的IP替换掉。注意替换前要把IP先Ping一下,确保是通的才替换,否则是无效的

3、替换后克隆代码速度从原来的几K/s一下子上升到了10M/s,如果过一段时间速度慢下来了,就再替换一次就好了。

 

posted on 2019-06-14 11:22  Rocky_  阅读(10065)  评论(0编辑  收藏  举报