命令hexo d 出现错误 Please make sure you have the correct access rights and the repository exists.

时间:2022-02-10 12:45:34

在遇到这个问题之前,我已经在前几天配置成功了ssh keys,并且上传过文件,可能在某个偶然的瞬间,我不小心又输入了一次命令:ssh-keygen -t rsa -C "2524366546@qq.com" 即又初始化了一次SSH Keys 一直到这里之前我还没意识到要重新把SSH Keys再关联一次,所以就导致了我今天遇到的如图显示的错误信息,不能将修改后的文件重新上传到我的GitHub仓库。

命令hexo d 出现错误 Please make sure you have the correct access rights and the repository exists.

解决方法1:如果你还没创建仓库,那就按照这篇博客:https://blog.csdn.net/weixin_41299929/article/details/79599884 第三点建立一个仓库。

解决方法2:添加ssh keys到GitHub

在文件目录:C:\User\xiaogui\.ssh\id_rsa.pub ,找到你生成的新的SSH Keys,然后全部复制该文件的内容,粘贴到:https://github.com/settings/keys的new SSH key 中,再回到Git bash页面,输入hexo d即可发现成功上传文件,问题已解决。