github权限被拒绝的VSCode(公钥)

github权限被拒绝的VSCode(公钥),github,visual-studio-code,Github,Visual Studio Code,我正在尝试将我的VSCode与我的GitHub同步,以便可以从VSCode提交,但我得到了错误 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. 不太确定如何修复此问题权限被拒绝(公钥)通常是SSH(g

我正在尝试将我的VSCode与我的GitHub同步,以便可以从VSCode提交,但我得到了错误

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.

不太确定如何修复此问题

权限被拒绝(公钥)
通常是SSH(git通信的协议)产生的错误。这意味着它正在查找您的SSH密钥,但找不到它。您最初是如何克隆存储库的?你在命令行上得到同样的错误吗?没有,我只在VScode中得到这个错误。我只是把我的项目文件夹推到一个空白的repo中。我提交gitbash没有问题。仅VSCode在Windows 10上使用VSCode(1.39.2)时,我也有同样的问题。VSCode抛出上面显示的权限错误,但我可以通过命令提示符和GitKraken拉/推而不出问题。