NOTE: This tutorial is a work in progress
How to install a local copy of git.gnome.org
This tutorial will show you how to create a local copy of the git.gnome.org website.
Pre-Requisites
Apache/httpd - How to install Apache/httpd on Fedora
cgit - Clone the repo (http://git.zx2c4.com/cgit) or install it directly from your Package Manager (sudo yum install cgit on Fedora)
Steps
1. Get the GNOME Grass theme for cgit
Using a Terminal, run the following command: git clone git://git.gnome.org/reponame
- This will clone the code for the GNOME Grass theme for cgit from the GNOME repository.
- You may clone the theme to any folder, just remember where it is. You're going to need the path in the next steps.
2. Configure a VirtualHost
Configure a VirtualHost at /etc/httpd/sites.d/my-vhost.conf or /etc/apache2/sites-available/my-vhost-conf.
Here's an example of a my-vhost.conf configuration (Pay attention to the paths that you need to change):
my-vhost.conf
<VirtualHost *:80> ServerName git.gnome.org DocumentRoot /path-to-the-directory-where-the-css-is CustomLog /var/log/httpd/access_log combined env=!dontlog ErrorLog /var/log/httpd/error_log <Directory /path-to-cgit.cgi-file> Options +ExecCGI </Directory> </VirtualHost>
[For Debian or Ubuntu] Using a Terminal, run the following command: ln -s /etc/apache2/sites-available/my-vhost.conf /etc/apache2/sites-available/my-vhost.conf - Symbolic Link
3. Setting up cgit
Copy the following content to cgit's configuration file at /etc/cgitrc.
Make sure the paths for css, header and footer match the path for your CSS directory.
/etc/cgitrc
# GNOME customization css=/browse/cgit-gnome.css # No logo, GNOME header is already logified logo= # Has GNOME header and footer header=/srv/http/cgit/gnome.header footer=/srv/http/cgit/gnome.footer favicon=http://www-old.gnome.org/img/logo/foot-16.png commit-filter=/usr/local/bin/cgit-commit-links.sh source-filter=/usr/local/bin/cgit-syntax-highlighting.sh # Looks funny if we don't have something here, maybe could be improved root-title=All Projects # Looks fine without a description though root-desc= clone-prefix=git://git.gnome.org http://git.gnome.org/browse ssh://USERNAME@git.gnome.org/git # Put all the modules on the first page of the project listing without pagination max-repo-count=655 # List the number of files and lines changed in the log enable-log-filecount=1 enable-log-linecount=1 # Allow download of tar.gz, tar.bz2 and zip-files snapshots=tar.gz zip mimetype.html=text/html mimetype.jpg=image/jpeg mimetype.jpeg=image/jpeg mimetype.pdf=application/pdf mimetype.png=image/png mimetype.svg=image/svg+xml mimetype.ogv=video/ogg #cache-size=1000 # All these cache settings influence the Expires header! cache-dynamic-ttl=60 cache-static-ttl=44640 cache-root-ttl=6 # Also used for the 'plain' / blob interface. cache-repo-ttl=120
Troubleshooting:
- Blabla