How To Install Gitolite on Linux

Why Gitolite

Git by itself does not do any access control – it relies on the transport medium to do authentication (“who are you?”), and on OS file permissions to do authorisation (“what are you allowed to do?”).

Git also comes with a program called “git-shell” which can act as a restricted login shell if you don’t want users getting a proper shell. Using this and judicious use of Unix groups, you can allow some people read-only access while others get read-write access, etc. This is probably sufficient if your needs are simple and don’t change too often.

However, gitolite does this much better, and offers many more features

Gitolite is useful in any server that is going to host multiple git repositories, each with many developers, where “anyone can do anything to any repo” is not a good idea….

Giteolite will let you pick which developers have access to which repositories and which branches and more…. Gitolite, Gitolite, Gitolite it will save you!!!

How To Install Gitolite on Linux

Login in as root

now you have to create the git(make it git or gitolite) account

useradd git
passwd git

Now login as git or gitolite

You need to copy your SSH public key (a file called ~/.ssh/id_rsa.pub) from your workstation, renaming it to yourname.pub (we’ll use jsmith.pub in our examples).