0


git报错:Failed to connect to github.com port 443: Timed out

一、问题

git push代码时,报错
在这里插入图片描述
接着发现无法ping通github.com
在这里插入图片描述

二、解决方法

思路

  • 修改hosts文件,让主机跳过DNS服务器,直接根据hosts配置信息替换域名

步骤
1、在ipaddress.com查询Github真实IP地址
在这里插入图片描述
2、打开hosts文件,一般位于

C:\Windows\System32\drivers\etc\hosts

,添加如下配置

140.82.114.4    github.com

3、再ping一下,成功!
而后正常push代码即可
在这里插入图片描述

标签: git github

本文转载自: https://blog.csdn.net/Y_soybean_milk/article/details/128237905
版权归原作者 Y_soybean_milk 所有, 如有侵权,请联系我们删除。

“git报错:Failed to connect to github.com port 443: Timed out”的评论:

还没有评论