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

亲测有效

相关推荐
工藤孤独29 分钟前
Git Worktree 从零到多智能体实战
git
微尘寒风10 小时前
【Git】的安装和使用
java·git
怕浪猫11 小时前
FDE 最大的浪费不是写出有 bug 的代码,而是漂亮地解决了一个错误的问题
面试·架构·github
黄敬峰13 小时前
Next.js 全栈实战:数据清洗、ORM 设计与 AI Prompt 工程最佳实践
面试·github
峰向AI17 小时前
AI reads books:用 AI 逐页「啃」PDF 的知识提取器,一个脚本搞定一切
github
Experience-摆渡19 小时前
GitHub 47万星免费公共API清单深度调研:收录规模、维护现状与实测
github
逛逛GitHub19 小时前
GitHub 上 2.5 万星星的开源 Skill 让 AI 画出漂亮图表。
github
Cosolar20 小时前
一文弄懂 Agent Harness 与 Agent Runtime 的区别
java·后端·github
YH552698420 小时前
如何减少大模型的token消耗?日常使用,可以通过什么方式减少大模型 token 的消耗
gpt·chatgpt·github
阿里嘎多学长20 小时前
2026-08-29 GitHub 热点项目精选
开发语言·程序员·github·代码托管