問(wèn)題描述:Please make sure you have the correct access rights and the repository exists.
解決步驟:
1延赌、打開終端重新設(shè)置用戶名和郵箱:
①:git config --global user.name "yourname"
②:git config --global user.email “your@email.com"
注:yourname是要設(shè)置的名字闯传,your@email是要設(shè)置的郵箱唉匾。
2宾尚、刪除.ssh文件夾(直接搜索該文件夾)下的known_hosts(手動(dòng)刪除即可,沒(méi)有則跳過(guò))
3伐憾、繼續(xù)在終端輸入:
ssh-keygen -t rsa -C "your@email.com"
接著出現(xiàn):
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):
直接按下回車
然后系統(tǒng)會(huì)自動(dòng)在.ssh文件夾下生成兩個(gè)文件篙螟,id_rsa和id_rsa.pub芹扭,用記事本打開id_rsa.pub
將全部的內(nèi)容復(fù)制
4吨娜、打開https://github.com/脓匿,登陸你的賬戶,進(jìn)入設(shè)置
進(jìn)入ssh設(shè)置:
image.png
image.png
5宦赠、在終端輸入命令:
ssh -T git@github.com
即可完成