GitHub

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.

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 “Continue” button.

Hit the green "Continue" button.

The next screen includes a survey. You’re welcome to hit the “skip this step” link.

Verify your email address

GitHub will send you an email after you sign up. Click the link in the email to verify that the address belongs to you.

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.

Open your public key in Code with the following command:

WINGW64:/c/Users/user
 
code .ssh/id_rsa.pub

In Code, select all (Ctrl A) to highlight the contents of the file, and copy the selection to the clipboard (Ctrl C).

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

Choose Settings from the user menu in the upper-right of your GitHub page.

Choose “SSH and GPG Keys” from the left menu, then click “New SSH key” on the right.

Click the button to add an SSH key to your account.

Give your SSH Key a title (something to identify the machine on which the key was generated, such as “Surface Book”), and then paste in the contents that you copied from the terminal.

Paste in the contents of your public key.

Test your SSH key with your GitHub account

Return to Terminal and type the following command:

WINGW64:/c/Users/user
 



ssh -T git@github.com
The authenticity of host 'github.com (192.30.255.112)' can't be established.

RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.

Are you sure you want to continue connecting (yes/no)?

Go ahead and type yes.

WINGW64:/c/Users/user
 



Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts.

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

If you see a message like the one above, you’re ready to go!

If you have trouble…

If that didn’t work, your SSH keys may not have been generated with the correct file permissions, so run these two commands from your home directory (~):

WINGW64:/c/Users/user
 
chmod -R 700 .ssh/
chmod 600 .ssh/id_rsa