【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 [email protected]

使用ssh -T [email protected]来测试和GitHub的网络通信是否正常,如果提示Hi xxxxx! You've successfully authenticated, but GitHub does not provide shell access. 就表示一切正常了。

然后就可以正常上传了。

相关推荐
星辰离彬1 小时前
线上 Linux 环境 MySQL 磁盘 IO 高负载深度排查与性能优化实战
linux·运维·服务器·数据库·mysql·性能优化
cui_win3 小时前
Linux问题排查-找到偷偷写文件的进程
linux·运维·服务器·进程·lsof
XiaoCCCcCCccCcccC3 小时前
Linux 的 TCP 网络编程 -- 回显服务器,翻译服务器
linux·运维·服务器
mazi20043 小时前
Linux 系统不终止进程的情况下关闭长连接
linux·运维·服务器
LinuxSuRen4 小时前
Docker Compose Provider 服务介绍
java·运维·docker·容器·eureka
CoCode8888 小时前
文档债务拖累交付速度?5大优化策略文档自动化
运维·自动化
川石教育9 小时前
Docker中部署Alertmanager
运维·docker·容器
Gaoithe10 小时前
window 安装 wsl + cuda + Docker
运维·docker·容器
付出不多10 小时前
linux——mysql故障排查与生产环境优化
linux·运维·mysql
Big__Star11 小时前
Git 和 GitHub 学习指南本地 Git 配置、基础命令、GitHub 上传流程、企业开发中 Git 的使用流程、以及如何将代码部署到生产服务器
服务器·git·github