1. Github网站图片无法加载,githubusercontent.com无法正常访问

1.1. 问题描述:

所有githubusercontent.com域下的资源都无法访问,特别表现为Github网站图片无法加载

1.2. 原因:

估计是DNS的原因
(待深究)

1.3. 解决方法:

更改host文件

1.3.1. windows:

hosts在
C:\Windows\System32\drivers\etc\hosts文件
在末尾添加:

199.232.96.133 raw.githubusercontent.com
199.232.96.133 avatars0.githubusercontent.com
199.232.96.133 avatars1.githubusercontent.com
199.232.96.133 avatars2.githubusercontent.com
199.232.96.133 avatars3.githubusercontent.com
199.232.96.133 avatars4.githubusercontent.com
199.232.96.133 avatars5.githubusercontent.com
199.232.96.133 avatars6.githubusercontent.com
199.232.96.133 avatars7.githubusercontent.com
199.232.96.133 avatars8.githubusercontent.com

用管理员权限保存

前面的ip可以在ipaddress.com查询一下,当然直接用我这个也可以,查询的方法是为了防止IP更换

查询结果可能为空,如下图所示,这时候点击下面的第一条CNAME记录,取再次查询的结果即可

1.4. Linux

sudo cp /etc/hosts /etc/hosts.bak
sudo vim /etc/hosts

添加即可

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐