This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
cgit
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).
Installation
USE flags
USE flags for www-apps/cgit a fast web-interface for git repositories
+highlight
|
Enable source code highlighting |
+lua
|
Enable support for Lua scripting |
doc
|
Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally |
test
|
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) |
vhosts
|
Add support for installing web-based applications into a virtual-hosting environment |
cgit can be managed though webapp-config if the vhosts
USE flag is enabled. Without vhosts
it will install into normal directories.
Emerge
root #
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.
Web server
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.
Configuration
Relative configuration files include:
- /etc/cgitrc - The global configuration file. This is used to modifying settings for all users.
Usage
Coming soon...
Tips
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.Then add 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.
See also
- git — distributed revision control and source code management software.
- webapp-config — Gentoo's installer for web-based applications.