Git: Installation eines eigenen Servers auf Basis von Ubuntu 9.10 (samt Trac)

Lei­der haben sowohl Pos­te­rous als auch Blog­ger mich dazu gezwun­gen, das Doku­ment nur im PDF-For­mat anbie­ten zu kön­nen, da sich bei­de Sys­tem ent­we­der an der Län­ge und/oder den Son­der­zei­chen im Text ver­schluckt haben.

Fra­gen und Kom­men­ta­re bit­te trotz­dem in die Kom­men­ta­re.


Running trac-git on Ubuntu 9.04 Server

It took me around two hours to figu­re out, why Trac was always thro­wing the fol­lowing error, when laun­ched using tracd:

Warning: Can't synchronize with the repository (Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? ). Look in the Trac log for more information.

The Ubun­tu packa­ge trac-git was per­fect­ly instal­led and see­med to work fine. The real rea­son was that the Ubun­tu packa­ge trac-git depends on python2.6, which obvious­ly does­n’t work with trac-git.

So I did an

aptitude install python2.5 && rm /usr/bin/python && ln -s /usr/bin/python2.5 /usr/bin/python

which did the trick. After that, tracd was able to use the trac plugin for Git.

If it still does­n’t work make sure that you have at least the fol­lowing lines in your project’s trac.ini:

[components] # for plugin version 0.10 gitplugin.* = enabled  # for plugin version tracext.git.* = enabled  [git] cached_repository = true git_bin = /usr/bin/git persistent_cache = true shortrev_len = 7  [trac] repository_dir = /path/to/git/repository.git repository_type = git

If ever­ything abo­ve is set a

tracd --port 8000 /var/trac/yourpath

should start tracd and make it avail­ab­le via port 8000 on your machi­ne.