問題描述:Please make sure you have the correct access rights and the repository exists.
解決步驟:
1、打開終端重新設置用戶名和郵箱:
①:git config --global user.name "yourname"
②:git config --global user.email “your@email.com"
注:yourname是要設置的名字,your@email是要設置的郵箱。
2、刪除.ssh文件夾(直接搜索該文件夾)下的known_hosts(手動刪除即可,沒有則跳過)
3、繼續(xù)在終端輸入:
ssh-keygen -t rsa -C "your@email.com"
接著出現:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):
直接按下回車
然后系統(tǒng)會自動在.ssh文件夾下生成兩個文件,id_rsa和id_rsa.pub,用記事本打開id_rsa.pub
將全部的內容復制
4、打開https://github.com/,登陸你的賬戶,進入設置
進入ssh設置:

image.png

image.png
5、在終端輸入命令:
ssh -T git@github.com
即可完成