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

亲测有效

相关推荐
用什么都重名24 分钟前
Git分支合并与远程服务器同步实战:保留关键配置文件
运维·服务器·git
得要找到一束光1 小时前
git详细命令
git·github
LeahDizon1 小时前
AI Coding 协作实践方案
程序员·github·代码规范
2601_961875243 小时前
花生十三公考课程|网课|视频
数据库·windows·git·svn·eclipse·github
带娃的IT创业者5 小时前
GitHub 热门: coleam00/Archon —— 当 AI Agent 学会自我进化
人工智能·github·开源项目·ai agent·智能体·自我进化
lpfasd1235 小时前
2026年第24周GitHub趋势周报
github
江畔柳前堤6 小时前
github实战指南03-Pull Request 全流程实战
开发语言·人工智能·python·深度学习·github·word
EleganceJiaBao6 小时前
【Git】Git reset 完整指南:真正理解 HEAD、暂存区与工作区
git·github·reset
逛逛GitHub7 小时前
不要错过这 18 个本周 YYDS 的 GitHub 开源项目。
github
大刚测试开发实战7 小时前
TestHub数据工厂发布!附更新指南
前端·后端·github