github访问速度很慢(mac)

发布: 2019-03-26 22:57:55 标签: 前端开发

公司和家里的电脑访问github一直很快,最近几天家里边的电脑访问速度很慢,速度一秒一k地速度,实在受不了。网上看到了这个修改host文件的方法很管用,github访问和下载速度变得很快
简书

打开终端,编辑hosts文件

01sudo vim /etc/hosts
复制代码

添加以下内容

01# github
02151.101.185.194 github.global.ssl.fastly.net
03192.30.253.112 github.com
04151.101.112.133 assets-cdn.github.com
05151.101.184.133 assets-cdn.github.com
06185.199.108.153 documentcloud.github.com
07192.30.253.118 gist.github.com
08185.199.108.153 help.github.com
09192.30.253.120 nodeload.github.com
10151.101.112.133 raw.github.com
1123.21.63.56 status.github.com
12192.30.253.1668 training.github.com
13192.30.253.112 www.github.com
14151.101.13.194 github.global.ssl.fastly.net
15151.101.76.133 raw.githubusercontent.com
16151.101.184.133 avatars0.githubusercontent.com
17151.101.184.133 avatars1.githubusercontent.com
18151.101.184.133 avatars2.githubusercontent.com
19151.101.184.133 avatars3.githubusercontent.com
20151.101.184.133 avatars4.githubusercontent.com
21151.101.184.133 avatars5.githubusercontent.com
22151.101.184.133 avatars6.githubusercontent.com
23151.101.184.133 avatars7.githubusercontent.com
24151.101.184.133 avatars8.githubusercontent.com
复制代码

刷新dns

01dscacheutil -flushcache
复制代码