虚拟机终端fatal: unable to access ‘https://github.com/…/’: Failed to connect to github.com port 443: 连接超时
- 浏览器输入ipaddress.com,查询如下两个域名,并分别记录下其对应的ip:
(1)github.com
(2)github.global.ssl.fastly.net
- 修改hosts文件
输入命令 sudo vi /etc/hosts
输入对应的密码,回车,进入编辑模式修改内容完成
加入查询到的地址:
140.82.114.3 github.com
199.232.69.194 github.global.ssl.fastly.net
最后输入命令::wq 保存并退出
参考:https://blog.csdn.net/weixin_43715100/article/details/107156483?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param