Gitlab 提示:Please make sure you have the correct access rights and the repository exists.

gitlab更新代码时提示:

Please make sure you have the correct access rights
and the repository exists.

解决办法:

   1   找到 .ssh文件夹,编辑模式打开known_hosts,删除Gitlab中的ip对应的那一串。如果不知道可以直接删除该文件。

   2   在命令行输入:ssh-keygen -t rsa -C "username" (username为你git上的用户名)

 3   然后一路回车直到看见如下一串。

                

      4   进入目录:打开 username/.ssh/id_rsa.pub.

  5   复制全部内容。

    6  打开Gitlab地址,登陆你的账户,进入设置(Settings)找到 SSH Keys,在key的输入框中粘贴复制的keys。

  7  点击Add key。

  8  重新提交一次代码就可以上传了。

原文地址:https://www.cnblogs.com/testing-BH/p/11686171.html