User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:gitosis_management

This is an old revision of the document!


Managing Gitosis Repositories

Author: John Reese

Concepts

Gitosis stores repositories in the 'git' user's home directory. In the case of git.mantisbt.org, this path is /srv/git. Configuration of the hosted repositories is defined in a special repository gitosis-admin.git, which contains a single configuration file and a directory of users' SSH keys.

Gitosis does its magic via the post-update hook in the gitosis-admin repository; in other words, every time you push changes to the special repository, it automatically updates all the appropriate settings, files, etc on the server to match the new configuration.

Repository Layout

The gitosis-admin repository maintains a special structure of information. When checked out, it looks like this:

  gitosis-admin/
      gitosis.conf
      keydir/
          jreese.pub
          ....

The file gitosis.conf contains configuration information for all the repositories managed by Gitosis, including the gitosis-admin repo. It defines repositories and groups of users, and associated read/write privileges.

Because Git/Gitosis relies on SSH access for users to push changes to repositories, users are identified by their public SSH keys. The keydir/ directory contains all users' public keys in the filename format of <username>.pub.

Repository Management

This process assumes you have been granted admin access to Gitosis on the server.

General Process

Start by cloning the gitosis-admin repository. Naturally, you only need to do this once; any later changes to the repository can be handled using the same clone.

$ git clone git@mantisbt.org:gitosis-admin.git

Now that you have a successful clone, you can make your changes. Once you're done making changes, commit your changes, and push them back to the server.

$ git commit -a -m "<What you just did>"
$ git push

Gitosis will then handle updating all the repositories appropriately. You're done!

References

mantisbt/gitosis_management.1225913900.txt.gz · Last modified: 2008/11/05 14:43 (external edit)

CC Attribution-Noncommercial-Share Alike 4.0 International Driven by DokuWiki