GITHUB / LESSON 03
Account & SSH Setup.
Creating your account and setting up secure access

Loading the lesson…
Loading activities…
GITHUB / LESSON 03
Creating your account and setting up secure access

Loading the lesson…
Loading activities…
Before you can use GitHub you need two things. A GitHub account, and a way for your computer to connect to it securely. We're setting up both in this lesson, and I promise it's less scary than the word "SSH" makes it sound.
Already have a GitHub account? Skip straight to Part 2.
Open your web browser and head to github.com
You'll see a big "Sign up" button. Click it to start signing up.
You'll need a few things.
Username tips
GitHub will ask you to solve a puzzle to prove you're human. Then check your email for a verification code.
If GitHub asks you to pick a plan, go with Free. It has everything you need for this whole course.
Now your computer needs a way to talk to GitHub securely. We do that with something called SSH keys.
Think of SSH keys as a special lock-and-key setup.
Here's what happens when you connect to GitHub.
Alright, let's make your SSH keys and hook them up to GitHub.
Everything from here on needs Git on your computer, so check for it first.
See something like git version 2.x? You're good. If not, here's how to get it.
git --version without Git installed pops up a box offering to install Apple's Command Line Tools. Say yes, and Git comes along for the ride.sudo apt install git.Git stamps a name and email on every commit you make, and it won't let you commit until it knows them. Run these once (swap in your own name and the email you used for GitHub).
First, let's see if you've already got SSH keys lying around. Open your terminal and run this.
If you see files named id_ed25519 and id_ed25519.pub (or id_rsa and id_rsa.pub), you already have keys! Skip down to "Add Your Key to GitHub."
If you see "No such file or directory," we need to make some.
Run this command in your terminal (swap in your own GitHub email).
It'll ask you two things.
The SSH agent is the lil helper that manages your keys. Start it up with this.
You should see something like Agent pid 12345
Now tell the agent about your shiny new key.
Extra step on Mac. GitHub's own docs have Mac folks save the passphrase in the Keychain, so you're not retyping it after every restart. Create (or open) the file ~/.ssh/config and put this in it.
Then add the key with the Keychain flag instead of the plain command above.
(No passphrase on your key? GitHub's docs say to leave the UseKeychain line out of that file.)
Next we copy your public key so we can paste it into GitHub. Run the one for your computer.
On Mac
On Windows (Git Bash)
On Linux
Then highlight the output and copy it yourself.
Boom, your public key is on your clipboard!
Click your profile picture in the top-right corner of GitHub, then click "Settings."
In the left sidebar, click "SSH and GPG keys."
Click the green "New SSH key" button.
Click "Add SSH key." GitHub might ask you to confirm your password.
Let's make sure everything actually works. Run this command.
The first connection may show a host key fingerprint. Compare it with the fingerprint on GitHub's published SSH key fingerprints. Type yes only when it matches. If it differs, stop and check your connection before continuing.
If it worked, you'll see this.
"Permission denied" error
ssh-add -l"Could not open a connection" error
Forgot your passphrase
Your account is set up and connected, so now it's time to create your first project on GitHub. Next lesson we'll make a repository and hook it up to your computer...