关于将SSH密钥添加到GitHub的问题 [英] Issue on adding SSH key to GitHub
问题描述
我有一个似乎与GitHub使用的SSH密钥格式有关的问题。我使用Git Bash生成一个新的SSH密钥
$ ssh-keygen -t rsa -Cyouremail@youremail.com
然后,我将密钥复制到我的GitHub帐户页面的设置中的SSH部分。但是,问题通知如下所示
密钥无效。它必须以'ssh-ed25519','ssh-rsa','ssh-dss','ecdsa-sha2-nistp256','ecdsa-sha2-nistp384'或'ecdsa-sha2-nistp521'开头。检查你是否复制公钥中的一半
接下来,我编辑了我的SSH密钥与ssh-rsa和我的电子邮件地址在最后。但是,问题仍然存在。
任何人都可以告诉解决方案吗?
谢谢!
立即生成您的ssh密钥: 生成一个新的ssh密钥(如果您已经有密钥,则跳过此步骤) 将密钥设置在 你们都会开始: - ) I have got an issue that seems about the format of SSH key used by GitHub. I used Git Bash to generate a new SSH key
ssh-keygen -t rsa -Cyour @ email
home / .ssh
目录(或 Users /< your user> .ssh
在Windows下),打开它并复制内容
SSH密钥
添加ssh键
$ ssh-keygen -t rsa -C "youremail@youremail.com"
Then, I copied the key to the SSH section in settings of my GitHub account page. However, it came with the issue notice as follow
Key is invalid. It must begin with 'ssh-ed25519', 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'. Check that you're copying the public half of the key
Following that, I edited my SSH key starting with ssh-rsa and my email address at the end. However, the issue is still there.
Could anyone tell the solution about this?
Thanks!
Simply follow those steps and you will set up your ssh key in no time:
Generate a new ssh key (or skip this step if you already have a key)
ssh-keygen -t rsa -C "your@email"
Once you have your key set in
home/.ssh
directory (orUsers/<your user>.ssh
under windows), open it and copy the content
How to add sh key to github account?
- Login to github account
- Click on the rancher on the top right (Settings)
- Click on the
SSH keys
- Click on the
Add ssh key
- Paste your key and save
And you all set to go :-)
这篇关于关于将SSH密钥添加到GitHub的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!