美文网首页
Mac电脑解决Github无法加载或不显示图片问题

Mac电脑解决Github无法加载或不显示图片问题

作者: happycolt | 来源:发表于2020-06-09 17:13 被阅读0次

    1.打开IP查询网页

    2.查询下列域名对应的IP地址

    github.com
    gist.github.com
    assets-cdn.github.com
    raw.githubusercontent.com
    gist.githubusercontent.com
    cloud.githubusercontent.com
    camo.githubusercontent.com
    avatars0.githubusercontent.com
    avatars1.githubusercontent.com
    avatars2.githubusercontent.com
    avatars3.githubusercontent.com
    avatars4.githubusercontent.com
    avatars5.githubusercontent.com
    avatars6.githubusercontent.com
    avatars7.githubusercontent.com
    avatars8.githubusercontent.com
    
    查询域名IP

    例如查询后的结果是:

    140.82.114.3    github.com
    140.82.112.3    gist.github.com
    185.199.109.153   assets-cdn.github.com
    199.232.28.133    raw.githubusercontent.com
    199.232.28.133    gist.githubusercontent.com
    199.232.28.133    cloud.githubusercontent.com
    199.232.28.133    camo.githubusercontent.com
    199.232.28.133    avatars0.githubusercontent.com
    199.232.28.133    avatars1.githubusercontent.com
    199.232.28.133    avatars2.githubusercontent.com
    199.232.28.133    avatars3.githubusercontent.com
    199.232.28.133    avatars4.githubusercontent.com
    199.232.28.133    avatars5.githubusercontent.com
    199.232.28.133    avatars6.githubusercontent.com
    199.232.28.133    avatars7.githubusercontent.com
    199.232.28.133    avatars8.githubusercontent.com
    

    3.打开Mac终端

    1.输入命令sudo vi /etc/hosts
    2.输入电脑密码后,点击i键,进入Insert模式,将上面的查询结果拷贝进去

    例如:

    # GitHub Start
    140.82.114.3    github.com #(ip地址偶尔会变)
    140.82.112.3    gist.github.com #(ip地址偶尔会变)
    185.199.109.153   assets-cdn.github.com #(ip地址偶尔会变)
    199.232.28.133    raw.githubusercontent.com
    199.232.28.133    gist.githubusercontent.com
    199.232.28.133    cloud.githubusercontent.com
    199.232.28.133    camo.githubusercontent.com
    199.232.28.133    avatars0.githubusercontent.com
    199.232.28.133    avatars1.githubusercontent.com
    199.232.28.133    avatars2.githubusercontent.com
    199.232.28.133    avatars3.githubusercontent.com
    199.232.28.133    avatars4.githubusercontent.com
    199.232.28.133    avatars5.githubusercontent.com
    199.232.28.133    avatars6.githubusercontent.com
    199.232.28.133    avatars7.githubusercontent.com
    199.232.28.133    avatars8.githubusercontent.com
    # GitHub End
    

    3.点击esc 键,然后输入:wq保存退出即可。
    4.重新打开或刷新Github页面,页面或图片就可以加载出来了。

    相关文章

      网友评论

          本文标题:Mac电脑解决Github无法加载或不显示图片问题

          本文链接:https://www.haomeiwen.com/subject/fjketktx.html