20140604 fedora 19 gitweb in action - plembo/onemoretech GitHub Wiki

title: Fedora 19 gitweb in action link: https://onemoretech.wordpress.com/2014/06/04/fedora-19-gitweb-in-action/ author: phil2nc description: post_id: 7834 created: 2014/06/04 19:41:10 created_gmt: 2014/06/04 23:41:10 comment_status: closed post_name: fedora-19-gitweb-in-action status: publish post_type: post

Fedora 19 gitweb in action

Setting up gitweb on Fedora 19+ to publish git repositories using the Apache web server, once I reverse engineered how the rpm set things up. The Git book, sadly, couldn;t address the specifics of Red Hat's distinctive implementation. The Fedora version of the gitweb rpm deploys these files:

/etc/gitweb.conf
/etc/httpd/conf.d/git.conf
/usr/share/doc/gitweb-1.8.3.1
/usr/share/doc/gitweb-1.8.3.1/INSTALL
/usr/share/doc/gitweb-1.8.3.1/README
/var/www/git
/var/www/git/gitweb.cgi
/var/www/git/static
/var/www/git/static/git-favicon.png
/var/www/git/static/git-logo.png
/var/www/git/static/gitweb.css
/var/www/git/static/gitweb.js

The engine that drives everything in that package is gitweb.cgi, a perl script that serves the same purpose that hgweb.cgi does for Mercurial repositories. The script itself comes with preconfigured defaults, but these are overridden by global entries in the /etc/gitweb.conf config file. To publish my repos all I had to do was edit /etc/gitweb.conf. By default the global variable $project_root is commented out. The gitweb.cgi script itself maps this variable to /var/lib/git. Since the shared "bare" copies of my git repositories were being stored at /data/share/git all I had to do was edit gitweb.conf, uncomment $project_root and then change the path, thusly: [code language="perl" gutter="false"] our $project_root = "/data/share/git"; [/code] Once these changes were made I simply restarted Apache and pointed my browser at http://localhost/git. There are alternatives to gitweb, like GitList, for which there is this very good Fedora-centric installation tutorial. References: How to: Install and Configure GitWeb

Copyright 2004-2019 Phil Lembo