Sunday, May 11, 2008

subversion vs git

I stayed up late last night working to install a shared git repository for the Pyrex replacement project. First of all, copious thanks to johnw and Ilari on #git for their help on this.

I'm very much an enthusiast of Trac, it's an excellent engine for project websites and has all the essential tools, builtin and via plugins, that any project should need. Ok, so there's a few things a project could need that isn't already written, but new plugins are easy enough (it's all Python, after all).

As such, I like to leave user administration to Trac, and it maintains a .htusers and .access file local to each project for that purpose. Likewise, for SVN, we use WebDAV on Apache, whereas the ssh+svn method would require adding those users to the local system or PAM hacking.

Thus, the most direct path would seem to install GIT via WebDAV and run it from there. As Ilari pointed out, GIT's DAV has many problems over SVN, from lockups to a failed push sometimes corrupting the shared repository. I tried anyway, with hours of help from joshw, and at 5am I had to throw in the towel. I'm sure it's possible, but not with my current lack of GIT knowledge.

The other available solutions could work, but first I'd want to write some new Trac plugins for accepting developer ssh keys and using these on the backend to govern access or figure out the PAM configuration for .htusers to have restricted SSH access for GIT pushes.

There are certainly advantages to GIT, but server setup difficulty and added complications for Windows developers leads me to sticking with subversion servers with git-svn client-side for now.

2 comments:

Unknown said...

Don't know if this would have helped but there is a Git plugin for Trac:

http://trac-hacks.org/wiki/TracGitPlugin

Unknown said...

Oh I know, and it's pretty complete too, but it lacks user management in respect to GIT access.

What I'm lacking, and what needs to be written, is a UserPref plugin that lets users manage their SSH keys in Trac and plays nicely with gitosis

Ie, when a user has Trac permission to commit, gives them that, and stores their keys in the gitosis style.