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

1.原因:
公鑰出現問題
2.解決辦法:
(1)在需要送出檔案的目錄内,重新設定git使用者名字和郵箱
git config --global user.name "yourname" #yourname你設定的名字
git config --global user.email "[email protected]" #你的郵箱
(2)生成密鑰
ssh-keygen -t rsa -C "[email protected]" #填寫設定的郵箱
#回車出現:
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/yz/.ssh/id_rsa): #請按下回車
Enter passphrase (empty for no passphrase): #回車
Enter same passphrase again: #回車
#出現Your public key has been saved in /c/Users/yz/.ssh/id_rsa.pub 表示成功,公鑰儲存在/c/Users/yz/.ssh/id_rsa.pub
#複制id_rsa.pub内的公鑰
(3)打開
github,進入設定
點選左側的 SSH and GPG keys,建立ssh key,将剛才複制公鑰粘貼,然後點選添加即可。