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

亲测有效

相关推荐
爆爆凯1 小时前
MobaXterm_Portable_v23.2 免费下载与使用教程(附安卓替代方案)
java·github
图书馆钉子户6 小时前
git 常用功能
git
林一怂儿8 小时前
H5 火柴人科目三和GitHub获取仓库点星星的用户列表发生了艺术的碰撞
github
普世的微光8 小时前
ue----git局域网内部署裸仓库,别的机器进行访问
windows·git
图书馆钉子户8 小时前
怎么合并主从分支,要注意什么
git
David_0269 小时前
刚实习?还不知道git怎么使用?看完这篇文章,教你掌握git常用命令及场景
git
LIU_Skill10 小时前
Git版本控制系统---本地操作(万字详解!)
git
qq_2187533114 小时前
常用Git命令
java·git
油泼辣子多加17 小时前
2025年02月21日Github流行趋势
github
427724001 天前
IDEA使用git不提示账号密码登录,而是输入token问题解决
java·git·intellij-idea