2020/12/28 “fatal: Could not read from remote repository.”的解决方案(码云 gitee)

前言:当我们在将仓库克隆到本地时,发现git提示错误信息 “fatal: Could not read from remote repository.”
解决方案如下。

如图所示,我们使用 git clone xxxxxxxxxxxx 时遇到错误信息:

解决方案:

  1. 重新生成ssh
    输入:ssh-keygen -t rsa -C “[email protected]
    (其中:[email protected] 是自己gitee账号绑定的邮箱)

    在这里插入图片描述

然后一路按回车,直到出现最下面类似方框的东西
在这里插入图片描述

  1. 然后查看你的公钥
    输入:cat ~/.ssh/id_rsa.pub

复制出现的文本:
下图中打码部分(以ssh-rsa 开头,以账号的注册邮箱结尾的)在这里插入图片描述

  1. 进入gitee个人主页——设置——SSH公钥
    把复制的公钥按照要求添加

在这里插入图片描述

我们再重新clone一下试试

在这里插入图片描述
OK 问题解决。

猜你喜欢

转载自blog.csdn.net/qq_47354826/article/details/111875772