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

亲测有效

相关推荐
米诺zuo1 小时前
不同的项目仓库配置不同的github账号
github
小龙报1 小时前
《算法每日一题(1)--- 第31场蓝桥算法挑战赛》
c语言·开发语言·c++·git·算法·学习方法
修炼室1 小时前
如何在GitHub上查看自己提过的Issues
github
222you3 小时前
idea整合Git
git
CoderJia程序员甲4 小时前
GitHub 热榜项目 - 日榜(2025-10-21)
ai·开源·github·ai编程·github热榜
tokepson5 小时前
技术 | 在单台电脑上管理多个 GitHub 账户并解决推送问题(测试中)
github·技术·记录
tiantian_cool6 小时前
正确的 .gitignore 配置
前端·github
我狸才不是赔钱货6 小时前
AI大模型“战国策”:主流LLM平台简单介绍
c++·人工智能·程序人生·github·llama
今禾7 小时前
Git完全指南(下篇):Git高级技巧与问题解决
前端·git·github
Molesidy9 小时前
【Git】【TortoiseGit】TortoiseGit安装与基础使用
git