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

亲测有效

相关推荐
YuePeng11 小时前
一个注解起家,25 个模块收尾:Erupt 的生态版图长这样
后端·github
我是若尘13 小时前
发布分支落后于主干,MR 全是冲突?聊聊业界怎么治这个“祖传”难题
github
笨鸟先飞,勤能补拙13 小时前
网络安全等级保护 2.0:从定级备案、建设整改到持续合规的系统指南
网络·人工智能·windows·安全·web安全·网络安全·github
echoVic14 小时前
CI 已经绿了,为什么你的 Agent 还在用旧规则?
github
echoVic14 小时前
AI 评审最怕的不是漏报,而是审完以后代码已经变了
github
福如意如我心意16 小时前
git清除仓库敏感文件并同步至远端的操作
git
u13013017 小时前
GitHub 热榜项目:日榜(2026-08-10)
github
dong_junshuai18 小时前
每天一个开源项目#62 pdf-inspector:0.47秒解析200份PDF
开源·github
七牛开发者18 小时前
Codex 实践系列 Vol.04:用 Goal 和 Plan 管住一个长任务
java·数据库·人工智能·github·copilot
鬼手点金18 小时前
FreeLLMAPI 介绍
llm·github·nvidia·apikey·freellmapi·agnes ai·日日新