Installing a gitolite server
Gitolite provides a traditional source control management server for git, with multiple users and access rights
management. gitolite can be installed with the following command:
sudo apt i n s t a l l g i t o l i t e 3
Gitolite configuration
Configuration of the gitolite server is a little different that most other servers on Unix-like systems, in that
gitolite stores its configuration in a git repository rather than in files in /etc/. The first step to configuring
a new installation is therefore to allow access to the configuration repository.
First of all, let’s create a user for gitolite to use for the service:
sudo a ddu ser −−system −− s h e l l / b i n / bash −−group −−d i s a b l e d −password −−home /
home/ g i t g i t
Now we want to let gitolite know about the repository administrator’s public SSH key. This assumes that the
current user is the repository administrator. If you have not yet configured an SSH key, refer to openssh-keys
in this manual.
cp ~ / . s s h / i d _ r s a . pub /tmp/ $ ( whoami ) . pub
Let’s switch to the git user and import the administrator’s key into gitolite.
sudo su − g i t
g l −s e t u p /tmp / * . pub
Gitolite will allow you to make initial changes to its configuration file during the setup process. You can now
clone and modify the gitolite configuration repository from your administrator user (the user whose public
SSH key you imported). Switch back to that user, then clone the configuration repository:
e x i t
g i t c l o n e git@$IP_ADDRESS : g i t o l i t e −admin . g i t
cd g i t o l i t e −admin
The gitolite-admin contains two subdirectories, “conf” and “keydir”. The configuration files are in the conf
dir, and the keydir directory contains the list of user’s public SSH keys.
Do'stlaringiz bilan baham: