This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

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

Steps

1. Get the GNOME Grass theme for cgit

2. Configure a VirtualHost

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>

3. Setting up cgit

/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:


2024-10-23 11:06