Roadmap

This repository https://git.csx.cam.ac.uk/x/ucs/git/gitcam.git contains system configuration files and custom source code for the git repository service. Here is a brief guide to the interesting parts.

gitolite

Accounts are created by the gitolite-setup script. The skeleton home directory links all accounts to the global gitolite.rc and motd files. The gitolite setup uses a few custom plugins in the gitolite-local directory.

commands
extra commands for managing wild repos
hooks
git hooks shared by all repositories
syntactic-sugar
automatically define special public and ssh groups
triggers
ensure the web server can present the right information

By default, git relies on the presence or absence of hook scripts to control whether or not they run, but this requires shell access to the server. So instead we install a generic wrapper post-receive hook in each repository; it runs one or more feature-specific hooks depending on git configuration settings. These can be controlled by an account admin editing their gitolite.conf, or a user invoking the config command on a wild repo; in both cases you can only use safe settings permitted by gitolite.

git daemon

When an account is set up, it is also linked into the /home/gitdaemon directory of (potentially) exported repositories. The repositories that are actually exported are determined by gitolite creating or removing git-daemon-export-ok files depending on whether the "daemon" user has access to the repository. The global configuration is in the rc.git-daemon script.

Apache httpd

The Apache httpd.conf fragment sets up the /i/ authenticated and /x/ unauthenticated trees and arranges for the CGI scripts to run when appropriate.

As well as configuring gitweb, the gitweb.conf also does gitolite access control.

The git-http-bckend wrapper CGI does similar access control.

The server home page is generated by the account list CGI which gets the lists of account admins from the output of one of the gitolite triggers.

Web page templates

The pages are styled using the "Project Light" templates. You can view a copy of the Project Light guide on this server.

The Project Light CSS and Javascript are copied verbatim into subdirectories of www/light. The web pages use SSI to insert the header and footer, which are a stripped-down "web app" template based on what Raven and Hermes Webmail use. The header includes some monkey patching to disable some unwanted features of the full templates.

Copyright licence

Copyright © 2013-2015 University of Cambridge

The contents of this repository are free software; you can redistribute and/or modify them under the terms of the GNU General Public License version 2. (This is the same licence as git and gitolite.)

The Git logo that appears on these web pages was created by Jason Long and is licenced under the Creative Commons Attribution 3.0 Unported License.