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

亲测有效

相关推荐
Chasing Aurora2 小时前
Git 工程指引(命令+问题)
大数据·git·elasticsearch·团队开发·互联网大厂
帅得不敢出门2 小时前
精简Android SDK(AOSP)的git项目提高git指令速度
android·java·开发语言·git·elasticsearch
郑州光合科技余经理3 小时前
海外版生活服务系统源码 | 外卖+跑腿一站式平台技术解析
java·开发语言·javascript·git·spring cloud·php·生活
eggrall3 小时前
《Git 入门:从 0 到 1 玩转 Gitee 仓库》 一
git·gitee
菜鸟小芯4 小时前
OpenHarmony环境搭建——01-Windows系统下安装Git
windows·git
王大渣5 小时前
git删除submodule
git
梦中_破5 小时前
调试记录:git版本更新之后导致的git push失败
git
托马斯-酷涛5 小时前
加速GitHub加载速度-最终篇
github·proxy·代理
橘色的喵5 小时前
Git/Gerrit 分支替换操作及 `(no new changes)` 错误处理
git·gerrit
yuguo.im5 小时前
5 分钟快速入门 Github Actions
ci/cd·github·actions