首页 > 分享 > ssh: connect to host github.com port 22: Connection timed out

ssh: connect to host github.com port 22: Connection timed out

魔乐社区 ssh: connect to host github.com port 22: Connection timed out

文章摘要:当Git通过SSH连接GitHub时出现超时问题,可通过修改SSH配置改用443端口解决。具体步骤:1) 测试连接ssh -Tv git@github.com;2) 编辑/usr/local/etc/ssh_config文件,添加GitHub的443端口配置;3) 验证连接是否成功。该方法能绕过防火墙限制,恢复正常的Git远程仓库操作。配置生效后,终端会显示成功连接提示。(100字)

sztu@sztu:/data2/webServer/SZTUEnroll_student$ git pull
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.

在这里插入图片描述

1.查询链接情况以及详情

ssh -Tv git@github.com

sztu@sztu:/data2$ ssh -Tv git@github.com
OpenSSH_9.8p1, OpenSSL 3.0.13 30 Jan 2024
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to github.com [20.205.243.166] port 22.
在这里插入图片描述
使用SSH 443 端口

2.编辑 /usr/local/etc/ssh_config

在底部添加

Host github.com Hostname ssh.github.com Port 443 User git

在这里插入图片描述

3.确定是否修改成功

ssh -Tv git@github.com

在这里插入图片描述
出现下面这些就调整完成

点击阅读全文

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

相关知识

GIT ssh 无法连接解决方法 22 connection
用另一种方式解决WARNING: Retrying (Retry(total=4, connect
www.homeppt.com
www.bixiashenghua.com
www.affhi.com
OCA/OCP Oracle 数据库12c考试指南读书笔记:第14章: Oracle Networking
Discontinue support for weak cryptographic standards
iPad
出错了
linux 图形显示 环境变量设置 export DISPLAY=:0.0的解释

网址: ssh: connect to host github.com port 22: Connection timed out https://m.huajiangbk.com/newsview2474829.html

所属分类:花卉
上一篇: 花出现黄叶是什么原因 花黄叶落叶
下一篇: 刚出叶的玫瑰怎么修剪 玫瑰花需要