You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>Generating public/private ed25519 key pair.
>Enter a file in which to save the key (/Users/your_user_name/.ssh/id_ed25519):
Just press enter, which will save the file in the default directory (the one you created/validated in step 2)
You might get this prompt:
>Enter passphrase (empty for no passphrase):
Just press enter when you see this prompt. You don't need a password.
And viola! You have finished the hardest step. Now you have a unique key sitting on your computer doing absolutely nothing.
Add your keys to your local agent
Run this command:
eval"$(ssh-agent -s)"
Next run this command to give this agent the key:
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Now your agent has the key, but we will want to make sure we never have to do these steps again, so we're going to create a config file and add some stuff to it.
To create a file, run the following command:
touch ~/.ssh/config
Touch is the command to create a file with 0kb. That means an empty file. Touch is a "program" that your computer comes with, the second argument ~/.ssh/config is the path you are going to put the file. In this case you want it in your .ssh folder.
And you're done with the second part. If you did everything correctly, as long as you have this computer, you will never have to do these things again until you get a new computer.
There is the chance that you leak this key to the public. You would probably have to start over if that happened, so just don't go around sharing this information.
Add your keys to GitHub
You have created your key locally, but your GitHub account needs to know the public replica of your key so when you try to authenticate/sign-in/log-in it knows its you!
First we need to run this command, this will copy your key so we can paste it later on github.com
pbcopy <~/.ssh/id_ed25519.pub
Notice that we didn't give GitHub your private key, but the one that ends in .pub, GitHub never will get to see your private key.
Go to Github.com and click 'Settings'
In sidebar on the left side of the page, click ‘SSH and GPG keys’
Click ‘New SSH key’
Give it a name, it can be anything
In the ‘Key’ field, paste the copied content of your SSH public key (you copied it step 1, you can run the command again if you lost it)
Click ‘Add SSH key’. You may have to enter your password.
Now you're done. Time to move on to some other parts.
The text was updated successfully, but these errors were encountered:
What will I know after finishing this?
You will learn the following things
If you have any questions, don't hesitate to ask!
Setting up your SSH keys
We're going to generate a key on your computer that lets you push and pull code from GitHub.
mkdir ~/.ssh
And viola! You have finished the hardest step. Now you have a unique key sitting on your computer doing absolutely nothing.
Add your keys to your local agent
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
config
file and add some stuff to it.touch ~/.ssh/config
open ~/.ssh/config
And you're done with the second part. If you did everything correctly, as long as you have this computer, you will never have to do these things again until you get a new computer.
There is the chance that you leak this key to the public. You would probably have to start over if that happened, so just don't go around sharing this information.
Add your keys to GitHub
.pub
, GitHub never will get to see your private key.Now you're done. Time to move on to some other parts.
The text was updated successfully, but these errors were encountered: