当前位置:   article > 正文

git上传项目出现:Please make sure you have the correct access rights and the repository exists问题

please make sure you have the correct access rights and the repository exist

一、问题描述

最近做完项目后,远程上传Gitee仓库失败,并提示Please make sure you have the correct access rights and the repository exists。参考网上的方法并成功解决了问题。

二、原因分析

公钥出现问题或者gitee上没有ssh公钥,需要删除电脑中的.ssh下文件,然后重新生成ssh公钥。并在Gitee上添加一下即可。

三、方法步骤

        1、删除C盘下该目录的文件(我的目录下好像没有秘钥文件,所以会提交不了)

             

              以下是我的

             

        2、查看git全局配置

git config --list

查看箭头位置的配置,是否跟自己建的仓库(下图)中的user.name 和user.email匹配。如果不一样则执行下面的代码

git config --global user.name "想要设置的name"
git config --global user.email "你的邮箱"

3、修改本地的ssh文件。输入一下命令。然后一路回车

ssh-keygen -t rsa -C "上面设置的邮箱"

   

4、复制粘贴到gitee(我的问题应该是丢失了上面两个文件)

5、最后正常上传即可。上传成功

我解决问题参考了以下博客:针对git的ssh问题:Please make sure you have the correct access rights and the repository exists_设置了ssh后,为何代码拉取提示 please make sure you have the cor-CSDN博客

解决Please make sure you have the correct access rights and the repository exists 问题.-CSDN博客

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/579231
推荐阅读
相关标签
  

闽ICP备14008679号