【Github】ssh: connect to host github.com port 22: Connection refused

ssh: connect to host github.com port 22: Connection refused

近日在进行push的时候出现以下错误:

复制代码
$ git push
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.

解决思路:

参考资料:

然后保存,Git中输入一下密令:

复制代码
ssh -T git@github.com

使用ssh -T git@github.com来测试和GitHub的网络通信是否正常,如果提示Hi xxxxx! You've successfully authenticated, but GitHub does not provide shell access. 就表示一切正常了。

然后就可以正常上传了。

相关推荐
huainingning22 分钟前
锐捷10.X路由器版本升级不生效问题排查
运维·网络·智能路由器
荣合技术服务37 分钟前
HPC 超算集群故障维修实录:找荣合科算维护后,模拟仿真计算又能跑了
运维·服务器·超算服务器·荣合科算
miofly3 小时前
Inkling 2 Small 发布,基准测试大幅超越前代但不敌同级对手
开源·github
AR-26710-4 小时前
Linux Day31——实操启停服务改端口重启
linux·运维
dong_junshuai4 小时前
每天一个开源项目#153 LZ4:用块边界和有序并行换取低延迟
github
百度Geek说4 小时前
QCon上海2026:百度 SRE Agent 规模化落地实践解读
运维·自动化运维
叼烟扛炮4 小时前
Linux 学习笔记(五十八):IO 多路复用封神——epoll 底层原理揭秘
linux·运维·服务器·网络·笔记·学习·php
Qiongkura5 小时前
开源自荐:CodeYear:把本机 Git 历史变成年度代码手账(本地优先 · 零上传 · 已上 PyPI)
github
用户8351414049495 小时前
我把 claude-mem 跑了一遍:值得学的地方和踩到的坑
github·claude