[英]git@github.com: Permission denied (publickey) ERROR
I've have been trying to push to origin master, and I was getting different errors now I'm getting this 我一直在尝试推向起源大师,而现在我遇到了不同的错误
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.
How can I connect my github again? 如何再次连接我的github? I've tryed multiple different stuff.
我尝试了多种不同的东西。
You need to have a SSH key on your machine generated if not already generated. 如果尚未生成,则需要在计算机上生成SSH密钥。
This can be done by running following command in your .ssh folder 这可以通过在.ssh文件夹中运行以下命令来完成
ssh-keygen -t ecdsa -b 521 -f 'filepath/id_ecdsa'
More reading on ssh command . 有关ssh命令的更多信息。
This will generate a public and private key pair. 这将生成一个公钥和私钥对。 You need the public key added to your github account added or for a specific repo.
您需要将添加到您的github帐户中的公共密钥添加或用于特定回购。
cat
id_ecdsa.pub
and get it added to your github repo's SSH keys. cat
id_ecdsa.pub
并将其添加到您的github存储库的SSH密钥中。
Note that the name of file above can be anything. 请注意,上面的文件名可以是任何名称。 I just named it after the encryption type
ecdsa
preferable. 我只是以更可取的加密类型
ecdsa
命名了它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.