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  重新提交一次代碼就可以上傳了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM