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

亲测有效

相关推荐
~~李木子~~8 小时前
git仓库管理
git
秦jh_9 小时前
【git】远程操作
git
逛逛GitHub11 小时前
GitHub 开源 AI 好玩神器,自动记录你的一天。
前端·github
散峰而望11 小时前
C++入门(算法) - 习题
开发语言·c++·算法·github
mortimer11 小时前
faster-whisper本地转录简单方案
开源·github·openai
OpenTiny社区15 小时前
不止按钮和表格!TinyVue 偷偷上线 Space 组件,直接搞定「弹性+间距」布局
前端·vue.js·github
tianming201915 小时前
Gogs迁移到Gitea不完全指南
git·后端
用户2217659279215 小时前
python第三方库可以处理多线程请求接口结果顺序问题?
github
CoderJia程序员甲16 小时前
GitHub 热榜项目 - 日榜(2025-11-11)
ai·开源·大模型·github·ai教程
lkbhua莱克瓦2416 小时前
Java入门——Java跨平台的原理
java·开发语言·笔记·github