Github无法显示和上传头像的问题(已解决)

原因:DNS有问题

解决方法:window系统中,在C:\Windows\System32\drivers\etc文件夹修改hosts文件,添加以下内容:

#头像上传
199.232.96.133 media.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地址199.232.96.133是githubusercontent.com的IP地址,可能会有变化,可以在https://www.ipaddress.com/中进行查询。

(在上传头像出错的时候按F12看出错信息,可以看到网址media.githubusercontent.com)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容