Reactjs git@github.com:权限被拒绝(公钥)错误

Reactjs git@github.com:权限被拒绝(公钥)错误,reactjs,git,github,iterm2,iterm,Reactjs,Git,Github,Iterm2,Iterm,我一直在尝试推原始主机,我得到了不同的错误,现在我得到了这个 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. 如何再次连接github?我尝试了多种不同的方法。如果尚未生成SSH密钥,则需要在计算机上

我一直在尝试推原始主机,我得到了不同的错误,现在我得到了这个

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.

如何再次连接github?我尝试了多种不同的方法。

如果尚未生成SSH密钥,则需要在计算机上生成SSH密钥

这可以通过在.ssh文件夹中运行以下命令来完成

ssh-keygen -t ecdsa -b 521 -f 'filepath/id_ecdsa'
更多阅读

这将生成公钥和私钥对。您需要将公钥添加到您的github帐户或添加到特定的回购

cat
id\u ecdsa.pub
并将其添加到github repo的SSH密钥中


请注意,上面的文件名可以是任何名称。我只是以加密类型
ecdsa
命名

您是否已在github上正确设置了证书,然后又在您要推送的客户机上正确设置了证书?是否可以使用
ssh-Tv github.com
的输出编辑问题?可能重复