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  從新提交一次代碼就能夠上傳了。

相關文章
相關標籤/搜索