What is this module about?

Gitosis module automates access rights on a set of git repositories managed by Gitosis. It integrates perfectly with Open Atrium, or with any site with Organic Groups module configured.

Each group defines a set of git repositores. Users in a group which have added an ssh key to their account can clone the repositories of that group.

This module adds the following interactions:

  • admin/settings/gitosis: allows you to set the url to your gitosis-admin repository.
  • When editing a group, a section called Gitosis lets you define git repositories for it.
  • When a user edits his account, a section called "SSH Keys" let's her add public keys (thanks to sshkey module).
  • There are three drush tasks involved:
    • 'gitosis' is the main task that will update your Gitosis configuration periodically.
    • 'gitosis-load-config' takes your current gitosis.conf and saves it at admin/settings/gitosis > Main configuration.
    • 'gitosis-load-keys' looks for public keys at gitosis's keydir directory and attempts to match them with your users email, adding them if so.

Why did I created it?

I started doing some sysadmin work on top of programming at ideup! and got fed up of very repetitive tasks such as grant me access to this repository or revoke access to all repositories to this guy. We use Open Atrium to manage our projects, and in most of the cases everyone in a group deals with the repositories we created for it in Gitosis, so it made sense to link together Atrium and Gitosis so they could talk to each other automatically.

I could not find anything like it in the Drupal community, so I started working at my Github account a month ago, (early commits can be seen there). After three weeks I moved the project to Drupal.org and got it installed at my company's Open Atrium, were we have 30 users who deal with the repositories, 40 groups and several repositories per group. Within a couple o
f days I improved it enough to reach an stable release. Now I do not have to deal anymore with those anoying tasks!

In which scenarios it can be useful?

Generally in organizations where Drupal is used as a communication tool between groups and there is a considerable amount of git repositories related to each group.

How compatible is it with Drupal?

I wanted this module to run in a Drupal installation with the least dependencies as possible, so right now it works either at a Drupal site with modules Content, Text, Organic Groups and Sshkey enabled, or an Open Atrium with Sshkey module.

Where is it and what is its status?

The module is stable. I am currently writing functional tests for it. The next step will be to create a Drupal 7 version.

The module can be found at http://drupal.org/sandbox/juampy/1154658

CommentFileSizeAuthor
gitosis_admin.png45.57 KBjuampynr

Comments

juampynr’s picture

Assigned: juampynr » Unassigned

Removed "Assigned" setting so it can be evaluated by the Evaluation Team.

joachim’s picture

Status: Needs review » Needs work

Module code looks pretty good.

Only thing I can spot immediately is that you've got a hook_schema() that really doesn't need to be there!

I think this is a great idea for a module, and a very useful addition to any site using OpenAtrium. Hence I'm loath to say this... but AFAIK gitosis is deprecated in favour of gitolite -- at least that's what I've been told on places like the #git IRC channel and StackOverflow :/

juampynr’s picture

Status: Needs work » Needs review

I have removed the hook and the drupal_install_schema call as suggested. I even tested again the module installation to ensure it works as expected. You can check the commit diff here.

Regarding Gitolite, I was actually reading about it on their Github account the day before yesterday. I will have a look at it and probably even create a gitolite module to integrate it depending how good the improvements against Gitosis are.

Cheers and looking forward for your feedback.

joachim’s picture

Remember you don't need to uninstall the schema either... ;)

juampynr’s picture

Removed drupal_uninstall_schema() at hook_uninstall as suggested. Commit diff can be seen here.

ipwa’s picture

Thanks for this module, have been looking for ways to integrate Git reps with open atrium groups.

juampynr’s picture

Thanks ipwa. Let me know if you have any suggestions or issues. It has been working pretty well over the last 2 months at my work place.

Cheers.

juampynr’s picture

joachim, just wanted to let you know that I created a Gitolite integration based in this module and it is pending to be reviewed in the Project Applications queue at http://drupal.org/node/1210520.

Cheers

cweagans’s picture

Perhaps you could combine the two modules? The difference in the Gitosis and Gitolite config files is very minimal, and in most circumstances, you can use the same syntax without any issue. Perhaps just add a couple of radio buttons to select between Gitosis and Gitolite and base your config management on that.

jthorson’s picture

Status: Needs review » Closed (duplicate)

Marking this as duplicate, as #1210520: [D6] Gitolite has been set RTBC, and only one successful application is required to be granted 'Full Project' status.

If, for some reason, #1210520: [D6] Gitolite was to stall, and you wanted to take this module forward instead, then feel free to reverse this status change.

avpaderno’s picture

Title: Gitosis » [D6] Gitosis
Issue tags: -gitosis
Related issues: +#1210520: [D6] Gitolite