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

然后就可以正常上传了。

相关推荐
白菜欣3 小时前
Linux — 进程控制
android·linux·运维
JoneBB3 小时前
ABAP Webservice连接
运维·开发语言·数据库·学习
Tolalal4 小时前
Vmware Ubuntu虚拟机扩容
linux·运维·ubuntu
咚为5 小时前
比AccessLog更全面的原生Nginx 日志记录
运维·nginx·junit
我星期八休息5 小时前
Linux系统编程—基础IO
linux·运维·服务器·c语言·c++·人工智能·算法
凌晨一点的秃头猪5 小时前
【无标题】
github
a752066285 小时前
零基础实操:小龙虾 AI OpenClaw 接入 Kimi 详细步骤
运维·服务器
Goldbioinformatics5 小时前
Windows版Claude Cowork启动Linux问题
linux·运维·windows
念恒123066 小时前
Ext系列文件系统(下)
linux·运维·服务器