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

亲测有效

相关推荐
゛凌乱的记忆づ1 小时前
好用的md文件编辑器——TyporaS与Typora
笔记·git·typora·markdown
u1301304 小时前
GitHub 热榜项目:月榜(2026-10-31)
github
এ慕ོ冬℘゜4 小时前
Git 基础规范:小步提交、提交信息规范与常用命令
git·svn
忘了ʷºᵇₐ6 小时前
Git学习笔记
笔记·git·学习
wflynn6 小时前
GitHub 日榜趋势速报 | 2026-10-30
开源·github
miofly7 小时前
Anthropic为Claude四款模型加水印,两款旧模型留调参漏洞
开源·github
m4Rk_7 小时前
【论文阅读】Agent 记忆机制(116):Hybrid Memory——用互补策展与离线巩固构建长期记忆
论文阅读·人工智能·学习·开源·github
u1301309 小时前
GitHub 热榜项目:日榜(2026-10-31)
github
-梅10 小时前
GitHub Actions 自动化:5 个真实运维提效案例
运维·自动化·github
miofly10 小时前
GitHub 周榜趋势速报 | 2026-11-01
开源·github