直接改本机host。以windows 为例子。
首先在 http://github.global.ssl.fastly.net.ipaddress.com/
1.查询ip

找到ip:151.101.185.194
2.然后去去修改hosts
目录 C:\Windows\System32\drivers\etc 文件下的 hosts文件
因为win10原因, 需要管理员权限。这是把记事本以管理员身份运行就行了。修改如下

github.com git 地址是下图中ping的那个地址

github.global.ssl.fastly.net是上面那个链接里面查询出来的IP地址
然后保存配置。再次ping就行
ps:ping不一定能成功,能访问即可!
网友评论