CS 161: Operating Systems (2016)
Tuesday/Thursday 1:00-2:30
Pierce 301
Using code.seas.harvard.edu
We will be using git with code.seas.harvard.edu for turning in
problem set submissions as well as version control.
What is Git?
Git is a distributed version control system.
A version control system (or source code management system) is a tool
for storing the source files of a project, distributing them to
developers working on the project, and coordinating changes made
during development.
A version control system stores not just the current state of the
project, but all past states as well.
This makes it an important tool both for collaboration and for
historical investigation.
(Often finding when a bug was introduced makes it much easier to
diagnose and fix it.)
A distributed version control system does all this without
requiring a central master server.
Instead, each copy of the project contains the full change history and
copies can be synchronized with each other to share updates.
Git is one of several available distributed version
control systems; it was originally developed by
Linus Torvalds for development of the Linux kernel.
For information on how to use git, see
A Guide to Git.
What is code.seas.harvard.edu?
Code.seas is an online git repository and project management
website for SEAS.
We'll be using it for storing and submitting your work via git.
Signing up for code.seas
The following only needs to be done once. You may skip steps 1-3
if you already have a working code.seas account.
- Go to
The code.seas login page.
- Enter in your FAS credentials. If you have neither FAS nor SEAS
credentials, please see the course staff.
- You may be directed to an OpenID Verification page that asks
you to confirm your identity. Click the "Allow Always" button on
the right of the screen. You may then be asked to enter some details
for your profile, but will eventually see your Dashboard.
- The next step is to add your ssh keys:
- ssh keys provide you with a way to easily access your git
repositories from your virtual machine.
- If you haven't already, you need to create an ssh key
on your virtual machine.
- You can check out this handy SEAS
web page or follow these steps:
- Launch your VM.
- Open up a terminal.
- Run ssh-keygen -t rsa' and follow the
instructions.
- You have now created your ssh keys.
They live in the directory ~/.ssh.
- Now run cat .ssh/id_rsa.pub to display your
public key.
- Copy your public key (that is, select the text on the
screen, and copy it to the clipboard)
- From your dashboard in the SEAS Code Repository, click
"Manage SSH keys",
click "Add SSH Key", paste your key into the field, and
click "Save".
- You are now ready to use git with code.seas.harvard.edu!
Code.seas Troubleshooting
If you can't access code.seas from your virtual machine, just reboot your
virtual machine (this seems to be required frequently, especially if you
change networks).
If you are having any trouble with your keys (e.g., you cannot clone
a repo because "the connection timed out"), check if your firewall
is blocking port 22, and open port 22 if it is blocked. You can
use your favorite search engine to figure out how to do this.
If you are having any trouble logging in, please follow these steps:
- Quit your browser -- (flush cookies).
- Try to login to code.seas with your FAS account.
- If that fails, you may need to change your FAS password and repeat steps 1 and 2.
- If that fails, email SEAS support at help@seas.harvard.edu and let them
know your FAS and/or code.seas account name. They should be able to assist you.
Managing Assignments
The first week of the semester we will have you clone a repository so you
can begin viewing and understanding the code.
Instructions to do this are below.
Throughout the semester you will be modifying your clone and
submitting assignments by allowing us access to your repository.
Periodically, we may need to provide updates to your repositories.
In these cases, we will instruct you to pull from the master to your clone.
It's important that you have a mental model of how all these clones interact.
- There is a master repository owned by us that you will pull from but
never push to. If we have new code for you or patches to the system,
they will show up here. Also, if you end up needing to use a solution set,
it will be available from this repository.
- Each member of a partnership will have a clone on code.seas.
- You will complete assignment 1 in your own clone.
- You and your partner will create a team on code.seas.
- You will designate one of your personal repositories (or create a
new repository) as your
team repository, granting the team read access and
adding the team as a collaborator.
- You will grant cs161@seas read access to your team repository and
also add cs161@seas as a collaborator on your team repository.
If you do not do this, we cannot grade your assignments.
- Either you or your partner should be able to clone your team repository
onto your own virtual machine, where you will undoubtedly develop and debug
code. You must push the changes from these repositories back to your
team repository in order for us to grade your assignments.
As noted, you will be producing your own little clone army. Manage them
well!
Creating your Initial Clone on code.seas
You will do this as part of the first week's web work!
- Go to the os161
distribution on code.seas.harvard.edu
- Click on "clone repository". This takes you to a new page,
which gives you a chance to name your repository clone.
Keep the suggested name (username-os161).
- Click the orange "Clone Repository" button.
- After waiting for your repository to be created, you'll be at a page
that contains information about your new repository.
You're going to need the "Clone & push url" in a minute,
so either copy the URL, or figure out how to get back to this page.
- On the right sidebar, click the "Manage collaborators" button.
- On the right sidebar, click the "Add collaborators" button.
- On the "Add a user" tab, type in cs161, and click on (at least)
view and review, before clicking the orange "Add as collaborator"
button.
- Once you form your team for assignments 2, 3, and 4, you will also
add your partner as a collaborator.
- Back at the main page for your repo, click the "Manage read access"
button on the right side.
- Because you cloned from a public repository, your repository is, by
default, also public. Please click on "Make Private" to change the status to
private.
At this point you've created a clone on code.seas.harvard.edu.
Next, you'll want to create a clone on your virtual machine.
You now have a new folder called "~/cs161/os161", which
contains the entire distribution for OS/161. Throughout the semester, when
we want to distribute code to you, we will make it available in the
os161-2016 repository. It will make things easier if you have a shorthand
for that repo; you can set that up now by issuing the following command,
on your appliance, from inside the os161 directory:
git remote add handout git@code.seas.harvard.edu:cs161/os161-2016.git
This allows you to access our repository using the name handout for the
rest of the semester.
Submitting problem sets
Each time you begin an assignment, tag your repository
with the tag asstN-start, where N is the number of the assignment.
When you are ready to submit, tag your repository with
asstN-submit.
Create tags using the following commands:
git tag asstN-start
git tag asstN-submit
Note that you cannot tag uncommitted changes, so you will want to first
commit all your changes, then tag your repository and then finally
push your changes back to your clone on seas.harvard.edu by running:
git push origin master --tags
from your "os161" directory.
Please read the submit guide for more
information.