Home » Setting up GIT and Getting Course Tools and Data

Setting up GIT and Getting Course Tools and Data

The first part of document is about setting up git, which is great tool for collaborative development and version management. We use git (behind the scene) to keep your virtual machine up to date with the myriad of tools and data that we will examine in this course. But you might also find it useful for your team projects. Therefore, we encourage you to explore git further if you haven’t already.

The following steps should all be carried out in your Lubuntu virtual machine.

  1. Point your Web browser (Start->Internet->Firefox) to https://gitorious.oit.duke.edu/, and sign in with your Duke netid. From your Dashboard view, click “Manage SSH keys.” Then click “Add SSH key” on the right. A text box will open up waiting for you to fill out; we will come to back to this.
  2. Open up a Terminal (Start->Accessories->LXTerminal), and type in the command:
    ssh-keygen -t rsa -C "me@duke.edu"
    Replace “me” above with your Duke netid. You will be prompted a passphrase. Don’t leave it empty. If you don’t want to remember too many different passwords, just use the same one as your Lubuntu password. Next, issue the command:
    cat ~/.ssh/id_rsa.pub
    Highlight the entire output (which spans multiple lines) with your mouse to copy it. Don’t miss any part of the output, but don’t include any extra lines either.
  3. Switch back to the Web browser, paste the copied output into the text box, and click “Save.” After a short while, you will see a green check next to the SSH key you just uploaded.
  4. Now let’s wrap up git configuration. Switch back to your terminal, and issue the following two commands in sequence:
    git config --global user.name "My Name"
    git config --global user.email "me@duke.edu"
    Replace “My Name” and “me” above with your name and Duke netid. You need quotes around them.
  5. Finally, you can sync with the git repository of course tools and data. In your terminal, issue the following commands:
    wget http://www.cs.duke.edu/courses/spring14/compsci290/init.sh
    bash init.sh
    If all goes well, you will notice git start pulling files from the course repository. After it’s done, you can just remove init.sh with the following command:
    rm init.sh
  6. In the future, to keep your virtual machine up to date with respect to the course repository, you will just need to run in the terminal the following command:
    /opt/datacourse/sync.sh
    We will also remind you when you need to do that.