This example would show you how to install git server(gitolite) on linux server, Let’s begin.
1. System requirements
You must have following system components installed:
git 1.6.6 or later
check git version as follows:
git --version if git is not installed , you can use:yum install git-core to install git-core on your machine.
perl 5.8.8 or later
check git version as follows: perl --version
openssh 5.0 or later
check ssh version as follows: ssh -v localhost
the commands are as follows:
2. Setup a dedicated user id for git server
To install gitolite server, you must have a dedicated git user, let’s assume its name is gituser
- create the user git user login as root and input commands like these:
Here we create a user named gituser ,whose home directory is /gituser,it should not exist now, Let’s create it.
- Create the home directory for gituser login as root, and input commands like these:
Now you have gituser and setup its home directory ,and let’s continue.
3. generate the git key-pair files
Git would use RSA based public-private key files to authenticate each user.So we need to prepare one when install it. If you already have RSA key files, then skip this step, otherwise, you can do as follows:
Be care , we use empty password to generate the pub-private files.Download these files to your laptop, Take care of them , not lose them.
4. Install gitolite
Now everything is prepared, let’s begin to install gitolite server now. login as root and input the following commands:
If no error message found, then your gitolite server is just ok now , and the last step :
You should upload your id_rsa_gitroot.pub file to /gituser and then do as follows:
And now your gitolite server is up and you can open git client in your windows laptop, and clone like this:
Notes: you should firstly add your private ssh-key file to your git client.
You can find detail documents about the gitolite here: