Montag, 2. April 2012Gitolite 3 and gitwebThe author of gitolite is currently working on a rewrite of the widely used git repository management tool. The new branch got the working title "g3". Since we used an antique version of gitosis on our repository server I used the opportunity to migrate to the new version. So I wrote an live ebuild [1]. SetupA few steps are needed after installation:
GitwebThere are enough tutorials out there how to setup gitweb, so I only point out some specifics of our setup. The VirtualHost config looks something like this: ServerName git.fem.tu-ilmenau.de ServerAlias git* DocumentRoot /usr/share/gitweb <Directory /usr/share/gitweb> Allow from all AllowOverride all Order allow,deny Options ExecCGI <Files gitweb.cgi> SetHandler cgi-script </Files> </Directory> AliasMatch ^(/.*?\.git)(/.*)?$ /var/lib/gitolite/repositories$1$2 <Directory /var/lib/gitolite/repositories> Allow from all </Directory> SetEnv GITWEB_CONFIG /etc/git/gitweb_config.perl RewriteEngine on # redirect userdir listing to gitweb search RewriteRule ^/?(~[^/]+)/?$ /?s=$1 [R] # rewrite all other paths that aren't git repo internals to gitweb RewriteRule ^/$ /gitweb.cgi [PT] RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /gitweb.cgi%{REQUEST_URI} [L,PT] To make this work, you have to add some gitolite specific configuration to the gitweb config file: read_config_file("/etc/git/gitweb-gitolite.conf"); This works for git versions >= 1.7.5. For older version just prepend the contents of the gitweb-gitolite.conf to gitweb config. Note: Make sure the user running the webserver (gentoo: apache) is member of the group git, otherwise gitweb won't be able to browse repositories. MultikeysIf you have got more than one machine for developing and don't want to share your ssh key between them, you would need to add multiple ssh keys. With the multikey feature [3] of gitolite you can add as many ssh keys as you want for a username without changing gitolite configuration. [1] http://subversion.fem.tu-ilmenau.de/repository/fem-overlay/trunk/dev-vcs/gitolite/
(Seite 1 von 1, insgesamt 1 Einträge)
|
SucheArchivKategorien |