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

亲测有效

相关推荐
redreamSo1 天前
一天涨 1800 星的 GitHub 榜首:AI 编程瓶颈变成了 token
人工智能·开源·github
逛逛GitHub1 天前
盘点 18 个 Kimi K3 外网爆火的案例,太令人惊艳了。
github
CodexDave1 天前
数据库连接池耗尽:排查顺序与三层兜底
服务器·前端·数据库·git·云原生·容器·kubernetes
乐观的Terry1 天前
5、发布系统-Git 集成
大数据·git·elasticsearch
benchmark_cc1 天前
如何用 Python 进行多周期 K 线合成与时区对齐?基于 QuantDash 与 Pandas 的量化数据清洗实战(附 GitHub 源码)
开发语言·python·github·盯盘·pandas·quantdash·量化数据
luyingying1 天前
从 400 行到 30 个文件,我只做了一件事
github
武子康1 天前
GitHub Actions `pull_request_target` 与 Pwn Request:高权限工作流里的 Fork 代码执行风险(2026)
人工智能·github·ai编程
不怕犯错,就怕不做1 天前
GIT的简单打patch应用format-patch and git am
linux·git·全文检索
Byron Loong1 天前
【Git】如何检查 Ubuntu 系统上 gitLab 是否开启
git·ubuntu·gitlab
武子康1 天前
GitHub Models 7-30 退役全拆:Inventory + Capability Probe + Shadow Traffic + Brownout
人工智能·github·github copilot