【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. 就表示一切正常了。

然后就可以正常上传了。

相关推荐
创业之路&下一个五年20 分钟前
第一部分:服务器硬件配置
运维·服务器
CoderJia程序员甲43 分钟前
GitHub 热榜项目 - 日榜(2025-09-12)
ai·github·开源项目·github热榜
优秀的老黄1 小时前
Docker部署RabbitMQ
linux·运维·docker·中间件·容器·centos·rabbitmq
Lin_Aries_04211 小时前
容器使用卷
linux·运维·docker·云原生·容器·eureka
Liang_GaRy2 小时前
心路历程-Linux的特殊权限
linux·运维·服务器
非凡ghost2 小时前
AOMEI Partition Assistant磁盘分区工具:磁盘管理的得力助手
linux·运维·前端·数据库·学习·生活·软件需求
山君爱摸鱼2 小时前
Linux网络配置
linux·运维
寒士obj2 小时前
Docker的使用及核心命令
运维·docker·容器
Galeoto2 小时前
how to setup k3s on an offline ubuntu
linux·运维·ubuntu
蝎子莱莱爱打怪2 小时前
🚀🚀🚀嗨,一起来开发 开源IM系统呀!
前端·后端·github