一、显示图片问题
1.1 连接失败
1.访问下面网址,查询github相关访问的域名对应的ip。
域名查询网址:https://www.ipaddress.com/
查询下面三个域名ip:
github.com
github.global.ssl.fastly.net
codeload.Github.com
2.找到hosts文件,将上述三行(带ip)放在末尾,保存。
3.cmd刷新DNS: ipconfig /flushdns
1.2 github图片不正常显示
1.直接复制下述语句,如1.1操作,放入hosts文件。
# GitHub Start
192.30.253.112 Build software better, together
192.30.253.119 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
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
2.cmd刷新DNS: ipconfig /flushdns
二、GitHub本地上传
2.1 直接使用git命令
2.2 VS Code上传
拓展github插件,无须下载git,编辑代码方便。
VScode编辑代码+连接github