cgit is a fast web-interface (CGI) for git written in the C programming language. It makes it possible for potential contributors to track and view project source code from the web instead of through a git client. cgit is licensed under the GPLv2.
cgit is written and maintained by Gentoo developer Jason A. Donenfeld (zx2c4).
USE flags for www-apps/cgit a fast web-interface for git repositories
cgit can be managed though webapp-config if the
vhosts USE flag is enabled. Without
vhosts it will install into normal directories.
emerge --ask www-apps/cgit
After installation some post-install instructions should be viable in the output from the install command. Please read these instructions carefully before proceeding to use cgit.
cgit depends upon a web server in order to operate as intended. Fortunately several web servers are available through Portage:
After installing and configuring a web server of choice return here to continue the cgit configuration process.
Relative configuration files include:
- /etc/cgitrc - The global configuration file. This is used to modifying settings for all users.
Update repository list automatically
If you would like to update the list of git repositories in cgit automatically consider adding something similar to the following as a cron job:
/usr/share/webapps/cgit/<version_number>/hostroot/cgi-bin/cgit.cgi --scan-tree=/git/repo-parent-path > /etc/cgit-repos
Be sure to replace
<version_number>in the string above with the appropriate cgit version.
include=/etc/cgit-repos into the /etc/cgitrc global configuration file. This way it is simpler and more convenient. You won't need to update your cgitrc every time you add a new repository.
- git — distributed revision control and source code management software.
- webapp-config — Gentoo's installer for web-based applications.