前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >ssh: connect to host github.com port 22: Connection timed out

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

原创
作者头像
菜菜有点菜
发布于 2024-01-29 12:35:58
发布于 2024-01-29 12:35:58
2820
举报
文章被收录于专栏:白菜博客白菜博客

首先网络可以正常访问github但是,push代码超时???

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

不是网络问题》》》》

解决方法:

首先进入到.ssh文件夹(c盘-用户-主机名)

我的:C:\Users\Cat00011cat\.ssh

新建:config 文件 没有后缀。!!

添加配置:

代码语言:vim
AI代码解释
复制
Host github.com
User cat@thecat.top
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

cat@thecat.top 换成你自己github的邮箱

如下:

最后验证:

到此,问题解决 并成功push》》》

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
暂无评论
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文