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查询即可

亲测有效

相关推荐
前端 贾公子16 小时前
如何在 Github 上规范的提交 PR(图文详解)
github
汪海游龙16 小时前
03.13 AI 精选:1-bit 大模型官方推理框架
github·hacker news
月光下的麦克18 小时前
Git 打 Tag 的作用
git
DJ斯特拉19 小时前
git基本使用
git
闫记康19 小时前
scp工具
linux·运维·服务器·学习·ssh·github
我命由我1234519 小时前
Git 问题:Author identity unknown*** Please tell me who you are.
java·服务器·git·后端·学习·java-ee·学习方法
逛逛GitHub20 小时前
狠狠的 Pua 你的 OpenClaw 小龙虾,这 2 个 GitHub 项目开源了。
github
悲伤小伞1 天前
Git_原理及使用_撤销修改_删除文件
数据库·git
不做超级小白1 天前
Git大小写陷阱:当README.md遇上readme.md
linux·windows·git
testresultstomorrow1 天前
GitHub 代码上传与故障排除实战指南
经验分享·笔记·开源·github