Eric Guo's

Hoping writing JS, Ruby & Rails and Go article, but fallback to DevOps note

Building a Centrol Linux GIT Server Based on Gitolite in the Windows 7 Using PuTTY as Client


I’m using a Windows 7 as my working notebook and usually I use PuTTY as SSH client to linux machine. Recently my Boss plan to implement a dedicated SCM server using GIT and after do some internet research, I found some blogs saying do not using putty and gitolite together. Certainly, it is not true and here is how to build a dedicated centrol.

I assure you have already install the PuTTY (v0.62) and GIT Extension (Complete edition already include KDiff3, msysGIT, no need install separately), you also already have a running linux server (using Ubuntu 10.04.4) and setting up the SSH and network ready and be able to login via PuTTY.

Step 1, prepare the user gitolite RSA key in the putty (in Windows 7 machine)

Running PuTTY Key Generator and generate a SSH-2 RSA 2048 bit key, the PuTTY key file name like cvpmesgit1-admin.ppk, password protection is recommended.

Step 2, enable SSH login via PuTTY using the key you just generated: (now switch to the Linux server)

generate the public key file by copy those string from PuTTY Key Generator.

make sure using the as default user .ssh/authorized_keys as well and can successfully login via ssh.

Step 3, create user gitolite in default user or root:
sudo adduser \
--system \
--shell /bin/bash \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/gitolite gitolite
Step 4, copy the public key to the gitolite account:
sudo cp /home/gitolite
sudo chown gitolite:gitolite /home/gitolite/
Step 5, Become the gitolite user:
sudo su - gitolite
Step 6, Clone the lastest gitolite from (if you are behind the firewall, replace git to http):
git clone git://
Step 7, Install the gitolite:
cd gitolite
cd ~
Step 8, Setting the gitolite path
echo "PATH=/home/gitolite/bin:$PATH" >> ~/.bash_profile
source ~/.bash_profile
Step 9, setup the first user, just quite vim to configure file
Step 10, clone the gitolite@cvpmesgit1:gitolite-admin in the GIT Extension (we are back to Windows 7) and you can admin it using this repository using PuTTY in the Windows 7 environment now!

You can also continue to build gitweb and git-daemon following this blog, the rest after building gitolite is almost all right.