Github

Overview

Github is a online code repository that great expands the utility of git. It acts as a clearinghouse for code, and is used worldwide by researchers, government, and industry.

Create an Account

First up, we need to create an account on github.com. Navigate to the site, and click the Sign up button in the upper right.

Enter your email and create a password.

You will most likely receive an email from Github asking to confirm your account. Go and click that.

Creating SSH Keys and Adding to Github

Creating a new SSH key will invalidate all the places your current SSH key is used!

SSH Keys are a way to identify your computer when accessing external resources. Think about it like a password for your computer to log in by itself. The first thing we need to do is create an SSH key for your computer. Open up R Studio, and click on the Terminal tab in the bottom left pane. Copy the following, enter your correct email, and press enter to create a key: ssh-keygen -t ed25519 -C "your_email@example.com"

The terminal will look slightly different in my pictures, but the process is the same in the R Studio terminal.

It will ask where you want to save the key. Accept the defaults by pressing Enter.

It will then ask you to create a pass phrase, press enter twice to skip this step.

It will then show a printout of your key, and a little bit of art. I’ve greyed mine out here for security.

Next, type cd and press enter, followed by cat .ssh/id_ed25519.pub. It will print out a code starting with “ssh-ed25519 … your_email@smith.edu.” You want to highlight all of that, including the “ssh-ed25519” and your email, press CTRL or command + C to copy it.

We will now return to github.com and login.

In the upper right hand corner you will see your user profile dropdown. Click on that and go to Settings.

On your setting screen, in the left hand menu, click on “SSH and GPG keys.”

On the next screen, click the green button in the upper right that says “New SSH Key.”

On the following screen, name your key, and paste the text we copied into the “Key” box. Then press the “Add SSH Key” button.