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

然后就可以正常上传了。

相关推荐
甲鱼9294 小时前
MySQL 实战手记:日志管理与主从复制搭建全指南
运维
崔庆才丨静觅8 小时前
Claude Code GitHub Actions 使用教程
github·api·claude
砖厂小工1 天前
用 GLM + OpenClaw 打造你的 AI PR Review Agent — 让龙虾帮你审代码
android·github
程序员鱼皮1 天前
又一个新项目完结,我要出海了!
ai·github·开源项目
徐小夕1 天前
pxcharts-vue:一款专为 Vue3 打造的开源多维表格解决方案
前端·vue.js·github
Moment1 天前
想要长期陪伴你的助理?先从部署一个 OpenClaw 开始 😍😍😍
前端·后端·github
我叫黑大帅1 天前
前端如何利用 GitHub Actions 自动构建并发布到 GitHub Pages?
前端·面试·github
HelloGitHub1 天前
这个年轻的开源项目,想让每个人都能拥有自己的专业级 AI 智能体
开源·github·agent