0.0
No commit activity in last 3 years
No release in over 3 years
This gem provides a Ruby read-only interface to the gitolite git backend system (by parsing the configuration file found in the bare gitolite-admin repository). It aims to enable permission queries based on data written in the gitolite-admin repository. This fork is designed to work as part of a Ruby authorization mechanism to gitolite repositories.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.5.0
~> 3.12
~> 2.9.0
~> 0.6.2

Runtime

~> 0.4.4.1
~> 2.5.0
~> 1.5.0
 Project Readme

gitolite-dtg

Digital Technology Group, University of Cambridge

Forked from wingrunr21/gitolite

This gem provides a Ruby read-only interface to the gitolite git backend system (by parsing the configuration file found in the bare gitolite-admin repository). It aims to enable an application to query gitolite repository permissions based on data written in the gitolite-admin repository.

This fork is designed to work as part of a Ruby authorization mechanism to gitolite repositories (see the related gollum-dtg project for an example of how we use it).

Please see the upstream project for a Ruby API aiming to provide all management functionality (read and write) that is available via the gitolite-admin repository (like SSH keys, adding/removing repositories, etc).

Requirements

  • Ruby 1.8.x or 1.9.x
  • a working gitolite installation
  • appropiate read permisions for the gitolite-admin bare repository

Installation

gem install gitolite-dtg

Usage

Load a gitolite-admin repo

require 'gitolite-dtg'
ga_repo = Gitolite::Dtg::GitoliteAdmin.new("/path/to/gitolite/repos/gitolite-admin.git")

This method can only be called on an existing gitolite-admin repo.

Caveats

Windows compatibility

The grit gem (which is used for under-the-hood git operations) does not currently support Windows. Until it does, gitolite will be unable to support Windows.

Group Ordering

When the gitolite backend parses the config file, it does so in one pass. Because of this, groups that are modified after being used do not see those changes reflected in previous uses.

For example:

@groupa = bob joe sue
@groupb = jim @groupa
@groupa = sam

Group b will contain the users jim, bob, joe, and sue

The gitolite gem, on the other hand, will always output groups so that all modifications are represented before it is ever used. For the above example, group b will be output with the following users: jim, bob, joe, sue, and sam. The groups in the config file will look like this:

@groupa = bob joe sue sam
@groupb = jim @groupa

Contributors

  • Stafford Brunk - wingrunr21 (original developer of the API)
  • Alexander Simonov - simonoff