1、打开路径C:\Windows\System32\drivers\etc\hosts
方法:直接在搜索hosts,或者用Everything搜索hosts。(Everything是个文件搜索工具,搜索超快的)
2、打开hosts文件,在最后粘贴以下内容
# GitHub Start
#192.30.253.112 github.com #注意着两个必须注释
#192.30.253.119 gist.github.com #必须注释掉,否则github无法打开
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
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
# GitHub End
注意:
#192.30.253.112 github.com
#192.30.253.119 gist.github.com
这两个#必须要有,否则github无法打开
3、保存hosts,刷新github页面,图片就可以显示出来了~