Free Hosting Online for WorkStations

< Previous | Contents | Next >

2.5. Gitolite configuration


Configuration of the gitolite server is a little different that most other servers on Unix-like systems. Instead of the traditional configuration files in /etc/, gitolite stores its configuration in a git repository. 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 be accessed as.


sudo adduser --system --shell /bin/bash --group --disabled-password --home /home/git git


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 Section 1.4, “SSH Keys” [p. 105]


cp ~/.ssh/id_rsa.pub /tmp/$(whoami).pub


Let's switch to the git user and import the administrator's key into gitolite.


sudo su - git

gl-setup /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:


exit

git clone git@$IP_ADDRESS:gitolite-admin.git cd gitolite-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.


Top OS Cloud Computing at OnWorks: