git 如何查看 github 的 SSH 密钥?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9766682/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I review my SSH key for github?
提问by Shawn
I recently got an e-mail from Github saying that I should review my SSH key:
我最近收到一封来自 Github 的电子邮件,说我应该检查我的 SSH 密钥:
Please review your keys and ensure you recognize them. If you have any doubts whatsoever, reject the keys and upload new keys.
请检查您的密钥并确保您识别它们。如果您有任何疑问,请拒绝密钥并上传新密钥。
How do I review my keys with git on ubuntu 11.10?
如何在 ubuntu 11.10 上使用 git 查看我的密钥?
回答by VonC
You can follow the GitHub guide "Reviewing your SSH keys"
您可以按照 GitHub 指南“查看您的 SSH 密钥”
To verify your SSH keys you need to find the fingerprint of each key on your computer and compare it to the fingerprint displayed on GitHub.
What's a Fingerprint?
要验证您的 SSH 密钥,您需要找到计算机上每个密钥的指纹,并将其与 GitHub 上显示的指纹进行比较。
什么是指纹?
An SSH key's fingerprint is a sequence of bytes unique to that key.
Fingerprints are usually encoded into hexadecimal strings and formatted into groups of characters for readability.
SSH 密钥的指纹是该密钥唯一的字节序列。
指纹通常被编码为十六进制字符串并格式化为字符组以提高可读性。
We display SSH key fingerprints on GitHub along with the key's title:
我们在 GitHub 上显示 SSH 密钥指纹以及密钥的标题:
From there, for Ubuntu, you can refer to "How do I find my RSA key fingerprint on ubuntu 10.04 (hosted by linode)" (-l here means to "list" instead of create).
从那里,对于 Ubuntu,您可以参考“如何在 ubuntu 10.04(由 linode 托管)上找到我的 RSA 密钥指纹”(-l 在这里表示“列出”而不是创建)。
$ ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub
回答by chx
You can also use https://github.com/username.keys(I used my keys as a demo URL).
您还可以使用https://github.com/username.keys(我使用我的密钥作为演示 URL)。
回答by kqw
If you have a bunch of keys to compare with the GitHub fingerprint this line comes in handy:
如果您有一堆密钥要与 GitHub 指纹进行比较,这一行就派上用场了:
cd ~/.ssh; for k in *.pub; do ssh-keygen -E md5 -lf $k; done
回答by midtiby
Try to push / pull to one of your own repositories on github. A message will appear that the current key is not authorized. In addition is the SSH fingerprint of the current computer and a link displayed where it is possible to review your keys. Follow the link and mark the SSH key from your computer as approved.
尝试推/拉到您自己在 github 上的存储库之一。将出现一条消息,指出当前密钥未经授权。此外还有当前计算机的 SSH 指纹和显示的链接,可以在其中查看您的密钥。按照链接将计算机上的 SSH 密钥标记为已批准。