Git setup and SSH configuration
In order to complete your assignments in CS559, you will need to install Git and configure it for SSH authentication with GitHub.
This page contains our “canonical” instructions for setting up Git with SSH. While experienced Git users are welcome to use it however they prefer, following these instructions will make it much easier for us to help you if something goes wrong.
See Git and GitHub in CS559 for more in-depth information on how to use Git and the role it plays in this class.
First-time setup instructions
Installing Git
The simplest way of installing Git on Windows is via Git for Windows. Similar download options are also available for Mac. The Git for Windows installer has many configuration options - we recommend accepting all of the defaults, unless you have an informed reason to do otherwise.
The Git for Windows installer will install Git Bash, a command line terminal that provides a Linux-like experience. You will need to use Git Bash to set up SSH authentication on Windows.
Setting up SSH authentication
In order to clone and push private repositories on GitHub, you will need to set up SSH authentication.
We strongly suggest following the numbered steps in the official GitHub documentation exactly as written.
- If you are on Windows, make sure to use Git Bash, not the Windows command prompt.
The last step in these instructions is to add your SSH key to your GitHub account. (If you do not already have a GitHub account, you will need to create one.) Once this is done, you will be ready to use Git in CS559.
If you experience any issues with Git authentication after following these steps, please ask about it on Piazza and we will be happy to help.
- Note: when cloning repositories, be sure to use the SSH link (e.g.,
git@github.com:organization/repository.git
) rather than the HTTPS link (e.g.,https://github.com/organization/repository.git
).
Summary: Windows checklist
(These are the same steps discussed above, listed here for convenience.)
- If you do not already have a GitHub account, create one.
- Install Git for Windows.
- Start Git Bash.
- Using Git Bash, follow the steps for generating an SSH key adding it to the ssh-agent.
- Using Git Bash, follow the steps for adding the SSH key to your GitHub account.
- To verify that everything is working correctly, consider making a new private repository on GitHub and cloning its SSH link to your computer.
Getting started with Git
If you are not familiar with using Git, or with working in a terminal, there will be a bit of a learning curve. Our guide to Git and GitHub in CS559 provides a detailed discussion of Git fundamentals, and includes links to other tutorials you may find helpful.
As an alternative to the terminal, you could also use a GUI application such as GitHub Desktop. While this may be more comfortable for beginners, we still recommend becoming familiar with using Git via the terminal. The terminal