錯誤訊息

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

上面這個訊息式CMD的回傳給我訊息,說我沒有相關權限可以上傳到我個人的Github

經上網查詢,照著以下步驟即可以解決問題(在CMD下指令)

 

1.git config --global user.name "yourname"

2.git config --global user.email“your@email.com"

3.刪除SSH資料夾,例如筆者的SSH位置就在C:\Users\使用者名稱\.ssh ,每個人的電腦名稱皆不同,不過大概滿容易找到的

   Ps. SSH 資料夾通常式隱藏的狀態,記得先把隱藏資料夾顯示出來

4.ssh-keygen -t rsa -C "your@email.com" 

5.之後CMD會回傳以下訊息

   Generating public/private rsa key pair.

   Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):

   持續一直往下按Enter

6.ssh的資料夾會看到相關檔案

   image

7.用文字編輯器打開 id_rsa.pub ,並且複製裡面的內容

8.開啟網頁Github個人頁面,Setting > SSH and GPG Keys > New SSH key

  image  

   image

9. ssh -T git@github.com

10. 完工

 

參考來源: git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”


arrow
arrow
    創作者介紹
    創作者 gamer99122 的頭像
    gamer99122

    菜鳥L的手札

    gamer99122 發表在 痞客邦 留言(0) 人氣()