打开电脑,突然github在谷歌上不能访问了,然而试了火狐浏览器,却能成功访问
以为是自己SwitchyOmega配置出了问题
一顿乱改,好的 谷歌上连百度都不能访问了,马上删掉自己的配置,重新按着网上教程配置 百度终于能访问了,但是github的访问还是有问题
解决:
百度一番转载自该博客,发现自己在hosts下配置的ip 居然被。。
http://www.github.com.ipaddress.com/
访问此网站,就能看到现在github的ip了
然后重新配置即可
配置如下:
sudo gedit /etc/hosts
142.82.113.4 github.com //在hosts文件上方插入即可
然后保存退出 ,果然github就能访问了
win下面 同样修改hosts文件即可,C:\Windows\System32\drivers\etc 中的hosts文件
突然思考 那之前为github访问慢配置的东西 是不是也可能不行了
赶紧查一波ip 根据上面给出的网页,举一反三查不同域名的ip
最终 配置如下
151.101.184.249 http://global-ssl.fastly.Net
140.82.113.4 github.com
192.30.253.118 gist.github.com
185.199.108.153 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