Skip to content

Setting up your CMSC 14300 repository

As in CMSC 14100 and CMSC 14200, you will use a private GitHub repository to store and submit your homework code. The process to request and initialize your repository is largely the same as in CMSC 14100 and CMSC 14200, but you should still read the instructions below carefully to make sure everything is properly set up.

In these instructions, we assume the following. If you took CMSC 14200, you should be all set but, if you placed into CMSC 14300, you may need to take a few extra steps.

  • We assume you know how to log into the CS Linux servers using SSH. If you have never done this, please read the Remote SSH Access section of the UChicago CS Student Resource Guide.
  • We assume you are already familiar with Git. If you are not or just need a refresher, please make sure to work through Git Basics tutorial.
  • We assume you have a GitHub account. If you do not, please create one one now. You can get an account here: https://github.com/join. We encourage you to use your CNetID as your GitHub account name, if possible. If that name is already taken, try using your CNetID as a prefix in your GitHub username.
  • Once you create your account, you may want to get the Student Developer Pack, which will give you access to a lot of other features (please note that having the Student Developer Pack is not necessary for your UChicago classes; it's just a nice benefit you get as a student).
  • We assume you have uploaded an SSH key to GitHub. If you are new to Git, and are working through the Git Basics tutorial, please note that the tutorial will explain how to do this.

Requesting Your Repository

You must request a repository following the instructions in this section. DO NOT use a personal repository in this class.

In this course, you will use a single repository for all your homeworks. The repository will be called cs143-coursework-GITHUB_USERNAME and will be created inside our cmsc143-smr-2023 organization on GitHub. For example, if your GitHub username is jrandom, the repository will be called cs143-coursework-jrandom. This repository will be private, and can only be viewed by you and the CS 143 course staff.

Open the following URL in a browser tab: https://classroom.github.com/a/ECEmbJoU.

Then complete the following steps:

  1. GitHub may ask you to grant permission for GitHub Classroom to have access to your GitHub account. If you are asked this question, you should say yes to grant access to GitHub Classroom.
  2. You will need to select your CNetID from a list. This step will allow us to know which student is associated with each GitHub account.
  3. You must click "Accept this assignment" or your repository will not actually be created. Do not skip this step!

If you run into any issues, please ask for help on Ed Discussion.

You may receive email from GitHub saying that the "@github-classroom[bot] has invited you to collaborate on the cmsc143-smr-2023/cs143-coursework-GITHUB_USERNAME repository". You can go ahead click on the "view invitation" button and accept the invitation.

DO NOT follow the repository initialization instructions provided by GitHub. Follow the instructions provided in the next section instead.

Setting Up Your Repository

In this section, you will finish setting up the repository you just requested. You will only need to do this once, since you will be using the same repository for all your homework this quarter.

Step 1

Verify that your repository has been created on GitHub. To do so, open a browser tab to this URL:

https://github.com/cmsc143-smr-2023/cs143-coursework-GITHUB_USERNAME
where GITHUB_USERNAME is replaced by your GitHub username. If you are not able to open this URL successfully, please ask for help.

Step 2

Get the SSH URL of the repository from GitHub. In the browser window that you opened to your repository, under "Quick setup - if you've done this kind of thing before", make sure the "SSH" button is selected. Your repository URL should look something like this: git@github.com:cmsc143-smr-2023/cs143-coursework-jrandom.git (Except jrandom will be your GitHub username). We will refer to this URL as REPO_URL later on.

Step 3

Run the commands listed below.

Recall that we use $ to signify the command-line prompt and that is not part of the command.

Remember to replace GITHUB_USERNAME with your GitHub username and REPO_URL with the SSH URL that appears on your repository page on GitHub (as described in Step 2)

Note

Do these commands one-by-one and pay attention to any errors that you encounter. If you encounter an error, don't keep going. Instead, please ask for help.

Once you accept the assignment, cd into the directory where you want to store your homework files, then run

$ git clone git@github.com:cmsc143-smr-2023/cs143-coursework-GITHUB_USERNAME.git

You might get a warning saying that you are trying to clone an empty directory; this is expected.

Your repository is now set up. We will provide instructions on how to add the Homework 1 files when the homework is published.

Check Your Repository Setup

Let's do a few checks to make sure everything is properly set up.

$ cd cs143-coursework-GITHUB_USERNAME
$ git remote -v

It should print the following:

origin  git@github.com:cmsc143-smr-2023/cs143-coursework-GITHUB_USERNAME.git (fetch)
origin  git@github.com:cmsc143-smr-2023/cs143-coursework-GITHUB_USERNAME.git (push)
where your GitHub username will appear instead of GITHUB_USERNAME.

If you see anything else, please ask for assistance on Ed.

Finally, if you run:

$ git status
in your coursework-GITHUB_USERNAME directory, the result should look similar to the following:
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean