Git is a source-code control system that allows multiple developers to work on the same project. Each developer has a copy of the repository on his workstation, and can check in changes to that repository and synchronize it with a central server. Other developers can then fetch those changes by synchronizing their local repository with the central one.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Virtualmin queries.
In this context, we shall look into how to enable Git on Virtualmin.
Before you can use Git with Virtualmin, you must first enable the Git plugin.
To enable Git plugin:
1. Firstly, enable the plugin at System Settings -> Features and Plugins.
2. Check the box next to Git repositories , then click the Save button.
If this plugin does not appear, you may need to first install it.
On a Redhat, Fedora or CentOS system, you can install plugin with the following commands, run as root.
On CentOS or RHEL, the install command is :
$ yum install wbm-virtualmin-git
For Debian or Ubuntu, the command is :
$ apt-get install webmin-virtualmin-git
If activating the plugin fails due to Git not being installed on your Virtualmin system, you will need to install it first.
On Redhat, Fedora or CentOS the commands for this are as follows :
$ rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
$ yum install git gitweb
$ sed -e 's/^/#/' -i /etc/httpd/conf.d/git.conf
$ apachectl graceful
While on Debian or Ubuntu, the command is :
$ apt-get install git gitweb
If neither of those work, you can install the plugin from a Webmin module package as follows :
Once the plugin is installed, you can enable it in Virtualmin as follows :
Once the plugin is installed, you can allow a virtual server to create Git repositories as follows :
This will perform the setup needed for repositories to be accessed under the /git URL path on this domain, but will not yet create any Git repositories.
Once a domain has Git enabled, you can add a repository to it like so :
Once this is done your new repository will appear in the list on the Git Repositories page.
It can then be accessed using the Git client with a URL like http://yourdomain.com/git/myproject.git .
For more information on exactly which commands to use, click the Repository Commands button.
Once you create a repository you can manage it using buttons on the Git Repositories page. These are :
This article covers steps to enable Git on Virtualmin.
To do this:
Once the plugin is installed, you can enable it in Virtualmin as follows :