开发者

Creating a SSH key for 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 ic开发者_StackOverflow社区on 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


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".


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


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

  1. ssh-keygen -t ed25519 -C "yourname@gmail.com"
    in my case: ssh-keygen -t ed25519 -C "shamiul@gmail.com"
  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 git@github.com

That's all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜