Please make sure...repository exists解决以及gitee生成/添加公钥ssh

366 阅读1分钟

解决Please make sure you have the correct access rights and the repository exists:

  1. 删除.ssh文件夹里的全部内容

image.png 2. 在桌面右键git bash here

image.png

输入以下两行命令, 用于设置用户名和邮箱

git config --global user.name ‘xxxxx’

git config --global user.email ‘xxxxx’

输入后可以 git config --list 查看下是否设置成功

  1. 继续输入命令 ssh-keygen -t rsa -C "这里是你刚才填写的邮箱地址"

image.png

  1. 输入命令 cat ~/.ssh/id_rsa.pub 获取到你的 public key, 以ssh-rsa开头, 复制ssh-rsa以后的内容

gitee添加公钥ssh: 5. 进入gitee设置页->安全设置->SSH公钥

image.png

image.png

点击确定

6.添加公钥后, 在git终端输入命令 ssh -T git@gitee.com ,若显示 Hi XXX! You've successfully authenticated, but Gitee.com does not provide shell access. 就说明你添加成功啦~