Untitled

We will use GitHub for all things related to code in class, including sharing lecture code examples, sharing starter homework and project code, submitting homeworks and projects, and collaborating on projects. It is a software development platform built on top of the git software, which is version control system for software.

Use this guide to get started with GitHub for the first time and learn some of the basics of the git software it is built upon.

Setup GitHub Account

If you do not yet have a free GitHub account, you need to create one:

https://github.com/join

When creating an account for this class (including accounts already created), keep in mind:

You can see the instructor’s profile page for an example. When done with this class, you’ll be able to show off your GitHub profile to potential employers.

Setup Repository Access

<aside> <img src="/icons/warning_gray.svg" alt="/icons/warning_gray.svg" width="40px" /> Using your GitHub username and password authentication no longer an option for authentication via the command-line.

</aside>

You will need to access your private GitHub repositories on your own local system to run and develop code. There are two options for accessing your private repositories:

  1. Using SSH, which involves generating SSH keys per system you want to access GitHub from. If you already use SSH (for example, to access stargate.cs.usfca.edu), then that approach may be more convenient since you likely already have SSH keys generated.

  2. Using HTTPS, which involves generating a personal access token (instead of a password). If you do not already use SSH, I recommend the HTTPS method. It allows more fine-grained control, including when it should expire. With this option, make sure to configure an expiration after the end of the semester, and add both “repo” and “workflow” access:

    Screenshot of GitHub interface for creating a personal access token and setting its permissions.

    Screenshot of GitHub interface for creating a personal access token and setting its permissions.

Either way works; they each have different pros and cons. When you know which method you prefer, go to the Authenticating with the command line article on GitHub for details about get started.

You should only need to complete this step once for the entire semester!

Learn Git and GitHub