Git出现ssh: connect to host gitee.com port 22: Connection timed out fatal:

1.问题所在

当在git bash命令窗口里输入完git push origin master命令后出现
出现ssh: connect to host gitee.com port 22: Connection timed out
fatal: Could not read from remote repository.
在这里插入图片描述

2.解决方法

步骤1:在gitee或者github里复制仓库链接的时候,选择https地址

插入图片描述
步骤2:输入以下命令移除之前的仓库连接

git remote rm origin

在这里插入图片描述

步骤三:再次进行仓库连接即可成功

git remote add origin https://gitee.com/llhgo/studentmanage.git
 git push origin master

在这里插入图片描述

  • 6
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
出现"ssh: connect to host gitee.com port 22: Connection timed out fatal: Could not read from remote repository"错误时,这意味着无法通过SSH连接到远程仓库。 解决方法如下: 1. 检查网络连接是否正常。确保你的网络连接没有问题,可以尝试使用其他网络或者重启你的网络设备。 引用提到的解决方法是通过添加远程仓库的连接来解决这个问题。你可以尝试以下步骤: 2. 打开git bash命令行窗口。 3. 使用以下命令添加远程仓库的连接: ``` git remote add origin https://gitee.com/llhgo/studentmanage.git ``` 这将添加一个名为origin的远程仓库,URL为https://gitee.com/llhgo/studentmanage.git。 4. 使用以下命令将本地的代码推送到远程仓库: ``` git push origin master ``` 引用给出的步骤是具体的远程仓库连接和推送的示例,你可以根据你的实际情况进行相应的修改。 如果你在特定的系统环境下遇到了这个问题,可以参考引用中的描述。根据这个描述,这个问题可能与你的系统环境以及npm构建有关。你可以尝试检查系统环境是否正常,并确保npm的配置正确。 总结起来,这个错误提示表示无法通过SSH连接到远程仓库。你可以尝试检查网络连接、添加远程仓库的连接并推送代码,或者根据引用中的描述检查系统环境和npm配置。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [Git出现ssh: connect to host gitee.com port 22: Connection timed out fatal:](https://blog.csdn.net/weixin_52690231/article/details/122925601)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [解决 github项目clone报错 Failed connect to github.com:443; Connection](https://download.csdn.net/download/weixin_38714641/14053810)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

GoGo在努力

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值