If you need to add a new SSH key to your github account, you can follow these steps: https://help.github.com/articles/generating-an-ssh-key/
If you're using the IDE, we'll need to do things a little differently:
- In the IDE terminal, check for an existing ssh key using these steps: https://help.github.com/articles/checking-for-existing-ssh-keys/
- If you do not have one, follow these steps ("Terminal" refers to the IDE terminal): https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ (Skip the section on adding your SSH key to your SSH Agent)
- Now type in
cat ~/.ssh/id_rsa.pub > ~/key.txt. This will create a file in your tree called
key.txtwhere the contents of the file is your SSH key.
- Now copy everything in
key.txtand add it to your github account per these instructions: https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/ (Note: you can skip Step 1:
pbcopy < ~/.ssh/id_rsa.pubbecause you're copying your key from the file we created in the step above).
Once you've followed all these steps, you can test that the key was added correctly by doing
ssh -T email@example.com. You should get a message back that has your username in it and lets you know that GitHub does not support shell access.
Check out this video for a walkthrough on how to add your SSH key to GitHub from the Learn IDE (note, this video uses a different method for retrieving the SSH key than the once listed above. The one listed above is a better method than the one used in the video):