windows下git pull超时,ping不通github

报错

ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

解决办法

修改hosts

最后加一行,文件位置:C:\Windows\System32\drivers\etc\hosts

java 复制代码
140.82.113.3 github.com
注意

github的IP地址可能会变,去ipaddress.com查询即可

亲测有效

相关推荐
ITsheng_ge11 分钟前
GitHub Pages 部署静态网站流程、常见问题以及解决方案
前端·github·持续部署
小Lu的开源日常42 分钟前
如何使用 GitHub Action 发布 Docker 镜像
docker·开源·github
SStone_TJ4 小时前
【常用的git命令】
git
没有鸡汤吃不下饭4 小时前
Git将某个分支合并到开发(dev)、测试(test)后突然想撤销该分支的功能,怎么处理?
前端·git·github
liangdabiao5 小时前
别忘了!claude code也是agent框架-do数据分析智能体AI-让数据分析变得像聊天一样简单
github
康一夏5 小时前
git fatal:Server aborted the SSL handshake
git·网络协议·ssl
逛逛GitHub5 小时前
GitHub 斩获 2 万 Star!把镜子变成智能助手,太炫了。
github
Vio72520 小时前
在IntelliJ IDEA中使用Git
git
Net_Walke21 小时前
git 的常用命令
git·物联网·github·iot
一点一木1 天前
🚀 2025 年 09 月 GitHub 十大热门项目排行榜 🔥
前端·人工智能·github