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:
- 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)
- 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):
- ssh-keygen -t ed25519 -C "yourname@gmail.com"
in my case: ssh-keygen -t ed25519 -C "shamiul@gmail.com" - eval "$(ssh-agent -s)"
- ~/.ssh/config
- touch ~/.ssh/config
- vim `/.ssh/config
- Host *
- AddKeysToAgent yes
- IdentityFile ~/.ssh/id_ed25519
- UseKeychain yes
- ssh-add ~/.ssh/id_ed25519
- cat ~/.ssh/id_ed25519.pub
- ssh -T git@github.com
That's all.
精彩评论