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

然后就可以正常上传了。

相关推荐
cooldream200915 小时前
Docker Desktop 安装与配置全流程指南(含 WSL2、汉化与问题排查)
运维·docker·容器
kaico201815 小时前
Jenkins Master 停机与备份
运维·servlet·jenkins
威迪斯特15 小时前
Gorilla框架:Go语言生态中的模块化开发利器
运维·开发语言·后端·golang·web框架·维护·gorilla
liuyao_xianhui15 小时前
Linux开发工具结尾 _make
linux·运维·服务器·数据结构·哈希算法·宽度优先·1024程序员节
MXsoft61815 小时前
【无标题】
运维·自动化
天疆说15 小时前
在 Ubuntu 22.04 上安装 Ghostty 终端
linux·运维·ubuntu
buhuizhiyuci15 小时前
熟练使用Linux编译工具(gcc, g++, make, makefile)
linux·运维·服务器
健康平安的活着15 小时前
使用tsf分析服务器的内存使用情况【经典版】
运维·服务器
wechatbot88815 小时前
企业微信 iPad 协议客服机器人自动化管理平台开发指南
java·运维·微信·自动化·企业微信·ipad
草莓熊Lotso15 小时前
从 LLM 底层原理到 LangChain 全链路打通:大模型应用开发新征程
linux·运维·服务器·人工智能·langchain