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.
The next screen includes a survey. You’re welcome to hit the “skip this step” link.
GitHub will send you an email after you sign up. Click the link in the email to verify that the address belongs to you.
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:
In Code, select all (
Ctrl A) to highlight the contents of the file, and copy the selection to the clipboard (
Now go to GitHub settings to add your public key to your account.
Choose “SSH and GPG Keys” from the left menu, then click “New SSH key” on the right.
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.
Return to Terminal and type the following command:
ssh -T email@example.com The authenticity of host 'github.com (126.96.36.199)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)?
Go ahead and type
Warning: Permanently added 'github.com,188.8.131.52' (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 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 (
chmod -R 700 .ssh/ chmod 600 .ssh/id_rsa