clone失败提示 Permission:denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

 问题: 克隆的时候有如下提示:

 

出现的场景:

之前有一次github上边的全部SSH都给删除了,然后在此进行Clone的时候通过SSH进行不行。

 

解决办法:

在电脑上重新生成秘钥,然后将秘钥配置在SSH上,重新下载即可success

 

具体步骤:

终端输入自己的github账号 比如:8888@gmail.com

ssh-keygen -t ed25519 -C "youremail@qq.com"

  

然后根据提示进行输入加密的串,可以选择空即直接enter下一步。

 

最后会提示一个文件路径以.pub为后缀,然后在目录中找到这个文件,将内容复制在github的个人中心设置SSH的位置,最后重新的clone,即可成功。

 

posted @ 2022-10-16 13:53  狼狼a够  阅读(186)  评论(0编辑  收藏  举报