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

亲测有效

相关推荐
郑州光合科技余经理2 小时前
同城外卖小程序开发:下单成功后,后台导出能不能对上用户端状态
开发语言·前端·git·后端·uni-app·php·ai编程
我命由我123452 小时前
Git 推送报错:error: src refspec main does not match any
运维·git·gitee·github·运维开发·学习方法·版本控制
阿里嘎多学长3 小时前
2026-09-20 GitHub 热点项目精选
开发语言·程序员·github·代码托管
峰向AI4 小时前
skill-up: [阿里开源] 让 AI Agent Skills 自己进化的评估工具
github
Lcr3s7 小时前
Git基础之(0):如何在Ubuntu(Linux)上安装git
git
子林super7 小时前
顺序表用Python3定义与增删改查
github
子林super7 小时前
Python非空判断与类型检查写法
github
子林super7 小时前
Python list与array关键区别及使用场景
github
子林super7 小时前
Python中None与null的区别
github
u13013010 小时前
GitHub 热榜项目:周榜(2026-09-20)
人工智能·github