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

然后就可以正常上传了。

相关推荐
李永奉4 小时前
Git和GitHub-VS Code 图形化 Git 放弃更改、暂存与取消暂存、撤销上一次提交(VS Code 界面操作 + 命令行对照)
git·github
TunerT_TQ8 小时前
【开源 L3 静态取证|工程评测】xnulinux:双内核实验——可复现的环境与许可比截图更重要
github
一条Go8 小时前
proto 契约:校验注解、错误码与「文案即接口」
后端·github
一条Go8 小时前
15 套品牌色 + 双模式:把颜色关进三层 token
前端·github
FlightYe8 小时前
linux系统编程(二十一):C 语言常见坑
android·linux·运维·服务器·c语言·音视频
橙橙笔记9 小时前
Linux基础与命令的学习
linux·运维·服务器·shell
无奈笑天下9 小时前
银河麒麟桌面操作系统【命令行配置文件与图片搜索功能】操作方法
linux·运维·服务器
飞花漫卷,情随岁迁10 小时前
网络数据包转发与内核机制:小白概念科普
linux·运维·网络·数据库·mysql·oracle·智能路由器
逛逛GitHub11 小时前
GitHub 上 1.6 万 Star!这个 GitHub 项目让 AI 帮你复刻视频
github
.道阻且长.11 小时前
Linux基础IO:理解文件以及回顾C文件接口
linux·运维·服务器·c语言·开发语言·职场和发展