cgit: A Web Interface for Git
Git is popular distributed version control system, it was developed by inventor of Linux, Linus Torvalds. Git has been gaining huge popularity in the ope-source community as well as in the corporate world due to it's distributed nature and efficiency.
I had a written a few articles on Git to in introduce people to Git, Introduction to Git VCS and Git VCS - Cloning & Workflow, you should read those too if you are completely new to Git.
In this article we'll be looking a installing a popular web interface for git repositories - cgit. cgit is a fast web interface for Git repositories, it is better than gitweb - another web interface for git - which is written in Perl, primarily because it's written in C and runs as a binary.
I am assuming you already have git installed, here is the flow of commands that need to be issued to get the stable source of cgit.
Now, we'll need to customize the install like the directory where CGI files would be installed, the config for the cgit binary, etc. Following are the defaults for cgit:
In case you want to change any of these (most likely you will, like I did), create a cgit.conf file in the same directory with variables you want to modify and their appropriate values, mine looks something like this:
Now, we'll need to compile & install cgit.
Next we would need to add some configuration in Apache for cgit to run.
Next comes creating and population cgitrc file with the list of repositories & their path. Look at the following cgitrc file, it's pretty simple.
That's it, restart Apache and go to the URL http://<your-server-ip>/cgit/cgit.cgi.
|All times are GMT +5.5. The time now is 14:01.|