Skip to content
Dave Strus edited this page May 25, 2016 · 4 revisions

Create a free GitHub account

GitHub is a service for storing your code in the cloud. It's wonderful for collaboration.

Sign up for GitHub using the same email address you used when creating your SSH key and your Git configuration.

Sign up for GitHub with your email address

On the next screen, you'll see information about GitHub's free and paid plans. To finish creating a free account, just hit the green "Finish sign up" button.

Hit the green "Finish sign up" button.

Add your public key to your GitHub account

To send and receive code between your laptop and GitHub securely, you'll need to add your public SSH key to your GitHub account. Never copy your private key to another machine unless you are absolutely sure what you're doing.

Copy your public key to the clipboard with the following command:

$ cat .ssh/id_rsa.pub | pbcopy

The cat command prints the contents of a text file to the screen—or more accurately, to STDOUT. The pbcopy command—which is not a standard UNIX utility, but is included with Babun—copies text to the clipboard. The pipe | takes the output from the command on the left and passes it as an argument to the command on the right.

Now go to GitHub settings to add your public key to your account.

Click the settings icon in the upper-right of your GitHub page

Choose "SSH Keys" from the left menu, then click "Add SSH key" on the right.

Click the button to add an SSH key to your account

Give your SSH Key a name (something to identify the machine on which the key was generated, such as "Windows 8.1 laptop"), and then paste in the contents that you copied from Atom.

Paste in the contents of your public key

Test your SSH key with your GitHub account

Type the following command:

If all is well, you should see a message like this:

You've successfully authenticated, but GitHub does not provide shell access.

If you see that message, you're in good shape! If you instead see something like...

This private key will be ignored.
Load key "/home/whoever/.ssh/id_rsa": bad permissions
Permission denied (publickey).

...then you need to run the following commands to change file permissions:

$ chmod -R 700 ~/.ssh/
$ chmod 600 ~/.ssh/id_rsa