windows下git clone速度慢或者图片无法显示问题

2019-12-17  本文已影响0人  王侦

1.查询IP地址

可以使用https://www.ipaddress.com/来查询github.global.ssl.fastly.net和github.com的IP地址。比如我这里查的分别是151.101.185.194和192.30.253.113

2.修改hosts文件

windows文件位置 C:\Windows\System32\drivers\etc\hosts
Linux和Mac文件位置 /etc/hosts
在hosts文件末尾添加两行:
github.com 192.30.253.113
github.global.ssl.fastly.Net 151.101.185.194

192.30.253.112    github.com 
192.30.253.119    gist.github.com
151.101.184.133    assets-cdn.github.com
151.101.184.133    raw.githubusercontent.com
151.101.184.133    gist.githubusercontent.com
151.101.184.133    cloud.githubusercontent.com
151.101.184.133    camo.githubusercontent.com
151.101.184.133    avatars0.githubusercontent.com
151.101.184.133    avatars1.githubusercontent.com
151.101.184.133    avatars2.githubusercontent.com
151.101.184.133    avatars3.githubusercontent.com
151.101.184.133    avatars4.githubusercontent.com
151.101.184.133    avatars5.githubusercontent.com
151.101.184.133    avatars6.githubusercontent.com
151.101.184.133    avatars7.githubusercontent.com
151.101.184.133    avatars8.githubusercontent.com

3.刷新DNS缓存

windows命令 ipconfig /flushdns
linux命令 sudo /etc/init.d/networking restart
Mac命令 sudo killall -HUP mDNSResponder

上一篇下一篇

猜你喜欢

热点阅读