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

gitlab更新代码时提示:git

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

 

解决办法:gitlab

   1   找到 .ssh文件夹,编辑模式打开known_hosts,删除Gitlab中的ip对应的那一串。若是不知道能够直接删除该文件。命令行

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

 3   而后一路回车直到看见以下一串。ip

                

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

  5   复制所有内容。rsa

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

  7  点击Add key。ssh-key

  8  从新提交一次代码就能够上传了。

相关文章
相关标签/搜索