为 GitHub 创建 SSH 密钥?

发布于 2024-12-02 03:55:30 字数 516 浏览 2 评论 0原文

我在为 GitHub 创建密钥时遇到问题。我按照 如何使用 TortoiseGit 的说明进行操作

为 GitHub 创建 SSH 密钥

  1. 打开 PuTTygen,生成密钥并保存您的私钥。在文本区域中标记密钥并将其粘贴到您的 github 帐户设置中(SSH 公钥→添加另一个公钥)。查看 PuTTygen 的 GitHub SSH 指南(顺便将密码保持为空)(在 GitHub 上为您的密钥提供任意名称)
  2. 启动 pageant 并通过右键单击图标并选择“添加密钥”来添加您的私钥,加载保存的密钥在上一步中,

我在步骤 1 中遇到了问题。我不知道如何“在文本区域中标记密钥并将其粘贴到您的 github 帐户设置中”。

谢谢

I am having trouble creating keys for GitHub. I am following the instructions from How to use TortoiseGit.

At Creating a SSH key for GitHub:

  1. Open PuTTygen, generate a key and save your private key. Mark the key in the text area and paste it into your github account settings (SSH Public Keys→Add another public key). Check out the GitHub SSH guide for PuTTygen (keep your passphrase empty by the way) (give your key any name on GitHub)
  2. Start pageant and add your private key by right clicking on the icon and choosing “Add Key”, load the key saved in the previous step

I am having trouble at step 1. I don't know how to "Mark the key in the text area and paste it into your github account settings".

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

漆黑的白昼 2024-12-09 03:55:30

登录www.github.com,然后在右上角有一个标题为“帐户设置”的链接,点击后,页面左侧有一个列表,单击“SSH”公钥”。

Log into www.github.com, then in the top right hand corner there is a link entitled "Account Settings", then after clicking it, there is a list on the left hand side of the page, click the one that says "SSH Public Keys".

后知后觉 2024-12-09 03:55:30

登录 SSH 密钥:http

absyid@absyid-ThinkPad-X240:~$ ssh-keygen -t ed25519 -C "email"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/absyid/.ssh/id_ed25519): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again:  
Your identification has been saved in /home/absyid/.ssh/id_ed25519
Your public key has been saved in /home/absyid/.ssh/id_ed25519.pub
The key fingerprint is:

The key's randomart image is:
absyid@absyid-ThinkPad-X240:~$ ls -al ~/.ssh
total 16

Membuat SSH KEY : http

absyid@absyid-ThinkPad-X240:~$ ssh-keygen -t ed25519 -C "email"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/absyid/.ssh/id_ed25519): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again:  
Your identification has been saved in /home/absyid/.ssh/id_ed25519
Your public key has been saved in /home/absyid/.ssh/id_ed25519.pub
The key fingerprint is:

The key's randomart image is:
absyid@absyid-ThinkPad-X240:~$ ls -al ~/.ssh
total 16
笑脸一如从前 2024-12-09 03:55:30

按照此命令行添加 ssh 密钥以避免身份验证(linux、windows、mac):

  1. ssh-keygen -t ed25519 -C "[电子邮件受保护]"
    就我而言:ssh-keygen -t ed25519 -C "[电子邮件受保护]
  2. eval "$(ssh-agent -s)"
  3. ~/.ssh/config
  4. touch ~/.ssh/config
  5. vim ` /.ssh/config
  6. 主机 *
  7. AddKeysToAgent 是
  8. IdentityFile ~/.ssh/id_ed25519
  9. UseKeychain 是
  10. ssh-add ~/.ssh/id_ed25519
  11. cat ~/.ssh/id_ed25519.pub
  12. ssh -T [电子邮件受保护]

仅此而已。

Follow this command line for adding ssh key to avoid authentication(linux, windows, mac):

  1. ssh-keygen -t ed25519 -C "[email protected]"
    in my case: ssh-keygen -t ed25519 -C "[email protected]"
  2. eval "$(ssh-agent -s)"
  3. ~/.ssh/config
  4. touch ~/.ssh/config
  5. vim `/.ssh/config
  6. Host *
  7. AddKeysToAgent yes
  8. IdentityFile ~/.ssh/id_ed25519
  9. UseKeychain yes
  10. ssh-add ~/.ssh/id_ed25519
  11. cat ~/.ssh/id_ed25519.pub
  12. ssh -T [email protected]

That's all.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文