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

亲测有效

相关推荐
uhakadotcom3 小时前
Guava 简介:让 Java 开发更高效
后端·面试·github
uhakadotcom4 小时前
FastAPI 安全配置指南
后端·面试·github
uhakadotcom4 小时前
快速理解 tiktoken:OpenAI 模型的高效 BPE 分词器
算法·面试·github
uhakadotcom4 小时前
轻松掌握 Griffe:Python 项目的 API 文档和兼容性管理利器
后端·面试·github
uhakadotcom4 小时前
MkDocs 入门指南:快速构建漂亮的静态网站
后端·面试·github
uhakadotcom4 小时前
PydanticAI:简化生成式 AI 应用的开发
后端·面试·github
uhakadotcom4 小时前
OpenAI 代理SDK入门指南
后端·面试·github
我是哪吒4 小时前
分布式微服务系统架构第99集:缓存系统的实战级优化案例
后端·面试·github
uhakadotcom4 小时前
DeBERTa:解析和应用指南
后端·面试·github
uhakadotcom4 小时前
了解LLMLingua:大语言模型的高效推理解决方案
后端·面试·github