加载Github图片失败

本人的全部博客中的图片均挂在Github中,如若无法显示,则需要改一些配置,具体操作如下:

Windows

打开系统目录C:\Windows\System32\drivers\etc中的hosts文件,文件末尾添加:

# GitHub Start 
140.82.113.3      github.com
140.82.114.20     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
199.232.68.133     avatars0.githubusercontent.com
199.232.28.133     avatars1.githubusercontent.com
151.101.184.133    avatars1.githubusercontent.com
151.101.184.133    avatars2.githubusercontent.com
199.232.28.133     avatars2.githubusercontent.com
151.101.184.133    avatars3.githubusercontent.com
199.232.68.133     avatars3.githubusercontent.com
151.101.184.133    avatars4.githubusercontent.com
199.232.68.133     avatars4.githubusercontent.com
151.101.184.133    avatars5.githubusercontent.com
199.232.68.133     avatars5.githubusercontent.com
151.101.184.133    avatars6.githubusercontent.com
199.232.68.133     avatars6.githubusercontent.com
151.101.184.133    avatars7.githubusercontent.com
199.232.68.133     avatars7.githubusercontent.com
151.101.184.133    avatars8.githubusercontent.com
199.232.68.133     avatars8.githubusercontent.com
 
# GitHub End

或者简便的做法为:打开cmd 输入ipconfig /flushdns即可

Mac && Linux

sudo vim /etc/hosts,修改hosts文件,添加内容同Windows。

Reference

https://blog.csdn.net/qq_38232598/article/details/91346392

如果有用请给我一个👍,转载注明:https://allentdan.github.io/

posted @ 2021-01-16 17:33  AllentBKY  阅读(302)  评论(0编辑  收藏  举报