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

亲测有效

相关推荐
猫头虎42 分钟前
猫头虎AI分享|一款Coze、Dify类开源AI应用超级智能体快速构建工具:FastbuildAI
人工智能·开源·prompt·github·aigc·ai编程·ai-native
我是哪吒1 小时前
分布式微服务系统架构第165集:阿里,字节,腾讯架构经验汇总
后端·面试·github
GoGeekBaird3 小时前
GoHumanLoopHub开源上线,开启Agent人际协作新方式
人工智能·后端·github
Yusei_05234 小时前
迅速掌握Git通用指令
大数据·git·elasticsearch
qq_3775727713 小时前
git commit - revert + reset + checkout + reorder
git
草梅友仁14 小时前
草梅 Auth 1.4.0 发布与 ESLint v9 更新 | 2025 年第 33 周草梅周报
vue.js·github·nuxt.js
寻月隐君15 小时前
硬核实战:从零到一,用 Rust 和 Axum 构建高性能聊天服务后端
后端·rust·github
CoderJia程序员甲18 小时前
GitHub 热榜项目 - 日榜(2025-08-16)
人工智能·ai·开源·github
2301_7672332219 小时前
Git使用和理解上的一些问题
git
python_1361 天前
web请求和响应
java·spring·github