Yaohong

为了真相不惜被羞辱

Config Github with SSH

Config Github with SSH

Generating a new SSH key

1.Open TerminalTerminalGit Bash.

2.Paste the text below, substituting in your GitHub email address.

$ ssh-keygen -t ed25519 -C "your_email@example.com"

3.Then you’re prompted to do something, press Enter.

Then the keys will be saved under ~/.ssh folder.

You can use ls -al ~/.ssh command to see them.

LOG:

$ ssh-keygen -t ed25519 -C "my_email@example.com"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/c/Users/myusername/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/myusername/.ssh/id_ed25519.
Your public key has been saved in /c/Users/myusername/.ssh/id_ed25519.pub.

Config github key

Copy gitbash: