简体   繁体   English

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

[英]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.

相关问题 如何解决 npm install react-select failure with error: An unknown git error occurred, git@github.com:Permission denied (publickey) - How to solve npm install react-select failure with error : An unknown git error occurred, git@github.com :Permission denied (publickey) 权限被拒绝(公钥)! - Permission denied (publickey)! Firebase 存储“权限被拒绝”错误 - Firebase Storage "Permission denied" error 错误发生意外错误:“EACCES:权限被拒绝 - error An unexpected error occurred: "EACCES: permission denied 显示权限被拒绝的 Git 操作:在 yarn generate 下推送代码时出现错误,导致检查失败 - Git Action showing Permission Denied: I have an error when pushing my code under yarn generate which causes check failure React Native Ios 错误:权限被拒绝,mkdir - React Native Ios Error: permission denied , mkdir 无法在Xcode中创建目录权限被拒绝的错误 - Unable To Create Directory Permission Denied Error In Xcode 错误 42501:NextJs 中的“公共架构的权限被拒绝” - Error 42501: "Permission denied for schema public", in NextJs 当我执行 npm install 时,Git Clone 的权限被拒绝 - Permission denied for Git Clone when I do npm install 为什么在nodejs中导致“错误:EINVAL”和“EPRM:权限被拒绝”问题? - Why “Error: EINVAL” & “EPRM:Permission denied” Problem causing in nodejs?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM