Setting Up Gitolite Permissions

Permissions Setup

Doing code reviews is far easier if you are able to run the code in addition to seeing it.  And the easiest way to access the files from your PEBLs' submissions is to clone their student repositories on your computer.  Before you can clone any repositories, you will need to set up your computer so that it has permission to access them.  To do this, follow the directions below.

Please note that these setup instructions require use of command line.

For Macs

In order to access student Git repos on your personal computer, you will need to get the provided key and config files and place them in the right spot on your computer:

1. Download the .zip containing your username from MaGE Resources > Tools > PEBL Repo Management > GEM Gitolite Files

2. Unzip the compressed file and note where on your computer it is currently (you will need to move it shortly)

3. Verify that the file named "config" contains the following:

host gitolite
    user git
    hostname upsource.mtholyoke.edu
    port 22
    identityfile ~/.ssh/yourusername

4. Locate the .ssh directory on your computer. It should be one of the hidden files in your userhome. (For example: Macintosh HD/Users/Barbara/.ssh)

5. Copy the contents of the unzipped folder into your local .ssh directory.

For Windows

Most of the process described for Macs will be the same for Windows. However, before you can make use of the commands listed above, you will need to download and install PuTTY. This should allow you to access your athena files via command prompt. (If you have never used command prompt, you should be able to find it by searching the available apps on your computer)

Once you have successfully installed PuTTY, you should be able to follow steps 1-3 as detailed above.

4. Open command prompt and enter the following command:

setx HOME %HOMEPATH%

5. Use the command echo %HOME% to determine the path to your local .ssh directory (the version that you just copied onto your computer)

6. Update the identityfile path in the local config file so that it reflects where the .ssh directory is now located on your computer.

Clone a Test Repository

Once you have moved the files to your local .ssh directory, use the following steps to verify that your config file is set up correctly:

  1. Navigate to the directory where you would like your PEBL repos to live on your computer
  2. Use the following command to clone your own student repo:
        • git clone gitolite:<YourUsername>Repo-Dev
  3. If it tells you that you do not have Git installed, used the instructions found at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git then try again
  4. Once it has finished cloning, you will still need to checkout a branch in order to see the files
  5. Navigate into the new directory named <YourUsername>Repo-Dev that was created when you cloned the repository
  6. Use the following command to checkout the branch where you will be able to see your code:
        • git checkout dev/all
  7. You should now be able to see the contents of your dev directory from athena