Skip to content

Using GitLab at code.vt.edu

Background

We will use the Git version control system for distributing code assignments, for submitting code assignments, and to track your work over the course of a project. To use the distributed version control features of Git, we use a Git server. There are a number of Git hosting services, for example GitHub, BitBucket, and GitLab. Each of these services has different policies for private hosting, which is necessary to maintain the honor code and respect student privacy.

Virginia Tech has its own instance of GitLab hosted at https://code.vt.edu. We will use this service for Git hosting in this class.

Access code.vt.edu

  1. In your web browser, navigate to code.vt.edu which is the online portal to the GitLab server that Virginia Tech maintains for students, faculty, and staff. One feature of this service is that it allows members of the VT community to create "private" repositories and choose who can access them.

  2. When accessing code.vt.edu you will first click on the Incommon Federation button, type Virginia Tech in the dialog box, and then you will proceed to the VT two factor authentication system. You will need to push a notification to your phone or other registered two factor device in order to gain access.

  3. After completing the previous step, you land on your account page for the VT GitLab service.

    This is your portal for creating, modifying, and deleting your Git repositories that are hosted on GiLab. Initially, there will be no listing of projects, unless you have previously created a repository on this site perhaps for a different class.

Create a new project

Important: The projects you are creating have to be private, which means not visible to others. Fortunately, it will be easy to see a project's visibility after it is created, because a private project will show a "lock" symbol next to its name.

  1. Decide on the project name: For grading purposes, all of you need to enter the exact same project name with correct spelling and case. We will provide for you the name that you must use.

  2. Assuming that you see the start page of code.vt.edu in your browser, you need to do one of the two steps:

  3. If you don't have any project, there will be four large boxes/buttons; in this case click on Create a project.
  4. If you have projects, there will be a list of these projects; in this case click on the New project button (top-right corner) and select Create blank project.

  5. The next screen must be filled out carefully

  6. "Project name": use the project name from step 1.
  7. Under "Project URL", drop down menu "Pick a group or namespace": select your name from the drop-down menu
  8. Under "Project URL", "Project slug": use the same as the project name (most likely keep autosuggestion)
  9. "Visibility level": select Private
  10. Under "Project configuration", "Initialize repository with a README": check box

  11. Finish the project creation by clicking blue Create project button at the bottom of the page.

Add other people to your project (e.g., Professor, TA, etc.)

  1. Open your project at code.vt, in the left-panel menu, navigate to “Project Information” and “Members”.

  2. In the top-right corner, click “Invite members” to add the following users to your project:

  3. "Username": jrudi
  4. "Select a role": "Developer"

  5. Click "Invite" button.

Add SSH public key from your computer

  1. Go to code.vt.edu
  2. In the left sidebar, click the user icon (it looks a bit like a random QR-code and it's on the same row as the "Virginia Tech" logo.). A small menu opens (it has your username at the top and "Sign out" at the bottom.)
  3. Click "Preferences" in that menu. A new page will load.
  4. On the new page, click "SSH Keys" in the sidebar. A new page will load.
  5. On the new page (titled "SSH Keys"), find a button at the top-right "Add new key". Click it. A new form will open.
  6. Fill out the form:
    • field "Key": copy the public key from your computer (located in folder ~/.ssh with filename ending in .pub), paste the key in this field.
    • field "Title": enter a name for the key, for example "Laptop" or "Matrix"
    • field "Usage type": keep default "Authentication & Signing"
    • field "Expiration date": remove date that's pre-filled
  7. Finish, click the "Add key" button.