本文共 1527 字,大约阅读时间需要 5 分钟。
最近在课设,想这参考参考网上开源的项目,结果发现 GitHub上的大部分项目的示例图片一个个都图裂,无法显示。网上搜索有人说原因是域名污染,咱也不知道是什么情况,反正照着下面的解决方法搞定就行。
解决方法: 打开 C:\Windows\System32\drivers\etc 下的 hosts 文件,直接用记事本打开就行。# GitHub151.101.184.133 assets-cdn.github.com151.101.184.133 raw.githubusercontent.com151.101.184.133 gist.githubusercontent.com151.101.184.133 cloud.githubusercontent.com151.101.184.133 camo.githubusercontent.com151.101.184.133 avatars0.githubusercontent.com199.232.68.133 avatars0.githubusercontent.com199.232.28.133 avatars1.githubusercontent.com151.101.184.133 avatars1.githubusercontent.com151.101.184.133 avatars2.githubusercontent.com199.232.28.133 avatars2.githubusercontent.com151.101.184.133 avatars3.githubusercontent.com199.232.68.133 avatars3.githubusercontent.com151.101.184.133 avatars4.githubusercontent.com199.232.68.133 avatars4.githubusercontent.com151.101.184.133 avatars5.githubusercontent.com199.232.68.133 avatars5.githubusercontent.com151.101.184.133 avatars6.githubusercontent.com199.232.68.133 avatars6.githubusercontent.com151.101.184.133 avatars7.githubusercontent.com199.232.68.133 avatars7.githubusercontent.com151.101.184.133 avatars8.githubusercontent.com199.232.68.133 avatars8.githubusercontent.com # GitHub End
效果图:
这个地址是有时效性的,可能过一段时间又不可以了,所以大家可以在网上搜搜有没有最新的地址,进行替换即可。
另外,复制这些地址可能会引起打不开GitHub的情况,如果打不开就把复制的地址去掉即可,当然这样又不能显示图片了,但是把地址复制到hosts中可以维持GitHub正常运行和显示图片一段短暂的时间,虽然有些麻烦,但确实可行,估计也有可能是网络问题,期待真正的解决方案。转载地址:http://imoi.baihongyu.com/