发布网友 发布时间:2024-10-23 11:33
共1个回答
热心网友 时间:2024-10-30 01:55
今天发现自己GitHub库里面项目能访问,但图片无法显示,F12看报错原因是ERR_CERT_COMMON_NAME_INVALID,这个错误一般是:
dns污染
host设置错误
官方更新了dns,但是dns缓存没有被更新,导致错误解析
解决方法:1.地址获取:通过站长工具找出解析最快的DNS地址。例如chinaz,IPAddress.com类似的网站,然后点开你github没能显示图片。
找到他对应的二级域名我这里是raw.githubusercontent.com
到上文提到的网站中找到对应最好ip地址。
2.修改hosts文件:我是Windows系统,hosts文件位置在C:\Windows\System32\drivers\etc中,把之前获取到的ip添加到hosts文件,没有修改权限直接复制hosts文件,再回去替换文件。
2021/10/18日有效,偷懒可以直接添加下面内容。
#GitHubStart140.82.113.3github.com140.82.114.20gist.github.com151.101.184.133assets-cdn.github.com151.101.184.133raw.githubusercontent.com199.232.28.133raw.githubusercontent.com151.101.184.133gist.githubusercontent.com151.101.184.133cloud.githubusercontent.com151.101.184.133camo.githubusercontent.com199.232.96.133avatars.githubusercontent.com151.101.184.133avatars0.githubusercontent.com199.232.68.133avatars0.githubusercontent.com199.232.28.133avatars0.githubusercontent.com199.232.28.133avatars1.githubusercontent.com151.101.184.133avatars1.githubusercontent.com151.101.108.133avatars1.githubusercontent.com151.101.184.133avatars2.githubusercontent.com199.232.28.133avatars2.githubusercontent.com151.101.184.133avatars3.githubusercontent.com199.232.68.133avatars3.githubusercontent.com151.101.184.133avatars4.githubusercontent.com199.232.68.133avatars4.githubusercontent.com151.101.184.133avatars5.githubusercontent.com199.232.68.133avatars5.githubusercontent.com151.101.184.133avatars6.githubusercontent.com199.232.68.133avatars6.githubusercontent.com151.101.184.133avatars7.githubusercontent.com199.232.68.133avatars7.githubusercontent.com151.101.184.133avatars8.githubusercontent.com199.232.68.133avatars8.githubusercontent.com199.232.96.133avatars9.githubusercontent.com#GitHubEnd之后图片再次出现无法显示,更新ip即可。
热心网友 时间:2024-10-30 01:56
今天发现自己GitHub库里面项目能访问,但图片无法显示,F12看报错原因是ERR_CERT_COMMON_NAME_INVALID,这个错误一般是:
dns污染
host设置错误
官方更新了dns,但是dns缓存没有被更新,导致错误解析
解决方法:1.地址获取:通过站长工具找出解析最快的DNS地址。例如chinaz,IPAddress.com类似的网站,然后点开你github没能显示图片。
找到他对应的二级域名我这里是raw.githubusercontent.com
到上文提到的网站中找到对应最好ip地址。
2.修改hosts文件:我是Windows系统,hosts文件位置在C:\Windows\System32\drivers\etc中,把之前获取到的ip添加到hosts文件,没有修改权限直接复制hosts文件,再回去替换文件。
2021/10/18日有效,偷懒可以直接添加下面内容。
#GitHubStart140.82.113.3github.com140.82.114.20gist.github.com151.101.184.133assets-cdn.github.com151.101.184.133raw.githubusercontent.com199.232.28.133raw.githubusercontent.com151.101.184.133gist.githubusercontent.com151.101.184.133cloud.githubusercontent.com151.101.184.133camo.githubusercontent.com199.232.96.133avatars.githubusercontent.com151.101.184.133avatars0.githubusercontent.com199.232.68.133avatars0.githubusercontent.com199.232.28.133avatars0.githubusercontent.com199.232.28.133avatars1.githubusercontent.com151.101.184.133avatars1.githubusercontent.com151.101.108.133avatars1.githubusercontent.com151.101.184.133avatars2.githubusercontent.com199.232.28.133avatars2.githubusercontent.com151.101.184.133avatars3.githubusercontent.com199.232.68.133avatars3.githubusercontent.com151.101.184.133avatars4.githubusercontent.com199.232.68.133avatars4.githubusercontent.com151.101.184.133avatars5.githubusercontent.com199.232.68.133avatars5.githubusercontent.com151.101.184.133avatars6.githubusercontent.com199.232.68.133avatars6.githubusercontent.com151.101.184.133avatars7.githubusercontent.com199.232.68.133avatars7.githubusercontent.com151.101.184.133avatars8.githubusercontent.com199.232.68.133avatars8.githubusercontent.com199.232.96.133avatars9.githubusercontent.com#GitHubEnd之后图片再次出现无法显示,更新ip即可。