无法使用 git@github.com 推送/拉取代码, 是抽风了还是被墙了?

2022 年 4 月 25 日
 beginor

这几天突然发现无法使用 git@github.com:user/repo 推送 /拉取代码了, 一开始以为是 ssh_key 过期的问题, 重新生成了新的 ssh_key , 发现还是不行, 提示如下:

git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

git push
ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
5817 次点击
所在节点    GitHub
29 条回复
jsdi
2022 年 4 月 25 日
+1 ,昨天突然不行了,重装了 git/更新 ssh 也没有解决,发现是被墙了,最终设置 http 代理成功解决了
yaott2020
2022 年 4 月 25 日
github 就挂梯子吧,与其去找 ip 填 hosts ,梯子反而好使
ccyu220
2022 年 4 月 25 日
@yaott2020 全局梯子也没用,基本都是 443
haoliang
2022 年 4 月 25 日
同!
今天下午移动网络+梯子,git 走 ssh ( 22 端口)死活不通;换到联通+梯子就可以了
beginor
2022 年 5 月 25 日
@MrCurly 这种配置已经失效了
MrCurly
2022 年 5 月 25 日
@beginor 我刚试了下还是好用的
MrCurly
2022 年 5 月 25 日
@beginor 你不是用的梯子么。。。用梯子吧,别浪费生命了
RedBeanIce
2022 年 6 月 9 日
我梯子 720p 油管都不卡,但是 git ssh 拉取代码就是 20k/s ,真的绝了。

求一个解决办法
kelvinaltajiin
2025 年 4 月 19 日
@mschultz #12 三年前的回复依旧在今天帮到了我

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/849046

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX