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   然后一路回车直到看见如下一串。

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

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

  5   复制全部内容。

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

  7  点击Add key。

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

相关文章:

  • 2021-04-01
  • 2021-06-20
  • 2021-11-22
  • 2021-12-25
  • 2021-08-20
  • 2021-10-06
  • 2021-06-25
猜你喜欢
  • 2021-12-17
  • 2021-09-23
  • 2021-08-12
相关资源
相似解决方案