我创建了一个新的远程仓库,并尝试使用git push -u origin master
命令将我本地的文件推送到新的仓库。但是,在我add
和commit
之后,它弹出以下错误:git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.
如何解决这个致命错误?
我尝试过如何解决使用 Git 时的"Permission denied (publickey)"错误?,但是此链接中的问题似乎发生在第一次使用 Git 时。我已经使用我的 Git 一段时间了,我还需要遵循此解决方案吗?是否有更具体的解决方案?
这是我收到的致命错误。
C:\Users\ASUS\Desktop\React-Practice App\my-app>git status
On branch master
nothing to commit, working tree clean
C:\Users\ASUS\Desktop\React-Practice App\my-app>git push -u origin master
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.