You are here

Git on AFS

Printer-friendly versionPrinter-friendly version

This is the help page for the AFS backed Git service in the School of Informatics.

For the old Git/Gerrit service, see:

Git and Gerrit

Using the School of Informatics Simple Git Service

The School of Informatics is now offering a simple Git service which uses AFS ACLs to manage access to the repository. This document details how to set up a repository on this new service and set the access permission for it.

Creating your repository

Go to https://afsgit.inf.ed.ac.uk. Type the desired name of the repository into the text box. If you don't want your repository to be accessible via the (totally unauthenticated) git protocol, make sure the tickbox has been cleared. Then click on the 'Create' Button. Assuming all goes well, your repository will be created and you will be informed of the various URLs to use to access it.

Controlling access to your new repository

As mentioned above, access to your new repository is controlled via AFS ACLs. When your repository was created, two AFS groups were created. These will have names like

<your username>:<repository-name>-pull-access
<your username>:<repository-name>-push-access

If you didn't enable git:// access when creating the repository, only users in the pull group can clone your repository (if you did enable git:// access, then anyone can clone your repository). Only users in the push group can actually contribute to your repository. To see the membership of a group, run the command

pts membership <group name>

At the moment, you will be the only member of both groups. To add users to a group, use:

pts add <username> <group name>

If you change your mind:

pts removeuser <username> <group name>

If you would like to give all DICE users access to your repository, add the special user system:authuser to your ACLs.  Note that there's no need to add the people in the push group to the pull group since they already have the appropriate permissions.

Moving  an existing repository to the new service

If you already have a git repository which you wish to move to the new service, this is one way of doing it:

  1. Create the new repository and set up the ACLs as above.
  2. Create a bare copy of your existing repository by running  the command git clone --bare <path to your repository> <repository-name>.git

    This will create a bare clone of your repository in the directory <repository-name>.git.     
    Cd to <repository-name>.git and run the command

    cp -r * /afs/inf.ed.ac.uk/group/git-repositories/<user name>/<repository-name>

You can then clone from and push to this repository as usual. If you encounter any issues with this new service, please contact services-unit@inf.ed.ac.uk.

Last reviewed: 
12/04/2016

System Status

Home dirs (AFS)
Network
Mail
Other services
Scheduled downtime

Choose a topic