一、先获取ithub域名IP地址
https://fastly.net.ipaddress.com/github.global.ssl.fastly.net
二、然后再去C盘里的hosts文件添加以上的查出来的域名IP地址
路径
C:\Windows\System32\drivers\etc中的hosts文件,添加如下内容
#github
140.82.112.4 github.com
199.232.69.194 github.global.ssl.fastly.net
185.199.108.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
刷新DNS缓存
打开cmd窗口,执行ipconfig /flushdns
命令