ping github.com
如果请求超时(Request timeout)
那么继续以下步骤:
1、查看github.com的IP
打开网址:https://www.ipaddress.com
image.png
image.png
2、查看github.global.ssl.fastly.net的IP
image.png
3、终端命令
sudo vi /etc/hosts
然后切换英文输入法输入 i 即可编辑
在最后一行加入以下代码:
140.82.113.4 github.com
151.101.1.194 github.global.ssl.fastly.net
按下键盘左上角esc按键,然后输入英文字母wq 回车键保存即可
然后重新执行ping命令
ping github.com
image.png
(control+C 可以终止)