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

然后就可以正常上传了。

相关推荐
凡间客1 小时前
Ansible安装与入门
linux·运维·ansible
_OP_CHEN1 小时前
Linux网络编程:(八)GCC/G++ 编译器完全指南:从编译原理到实战优化,手把手教你玩转 C/C++ 编译
linux·运维·c++·编译和链接·gcc/g++·编译优化·静态链接与动态链接
lkbhua莱克瓦241 小时前
Java基础——方法
java·开发语言·笔记·github·学习方法
阿乐艾官1 小时前
【十一、Linux管理网络安全】
linux·运维·web安全
LoneEon2 小时前
告别手动操作:用 Ansible 统一管理你的 Ubuntu 服务器集群
运维·服务器·ansible
百***67032 小时前
Nginx搭建负载均衡
运维·nginx·负载均衡
梁正雄3 小时前
17、grafana安装
运维·grafana·prometheus·监控
摘星|4 小时前
架设一台NFS服务器,并按照以下要求配置
linux·运维·服务器
做运维的阿瑞4 小时前
Linux环境变量持久化完全指南
linux·运维·服务器
Mr_Dwj5 小时前
【运维】GNU/Linux 入门笔记
linux·运维·gnu