1. Create a dedicated account on the server
sudo adduser--system--shell/bin/bash--group git
2. Add git to the SSH user group
sudo adduser git ssh
3. Set a password for your git account
sudo passwd git
4. Install Git and openssh-server
sudo apt-get install Git-core openssh-server
5. Configure Git
sudo apt-get install Git-core openssh-server
git config--global user.email [email protected]
6. Install Git-1.9.4-preview20140929.exe on the client computer and find Git bash.vbs in the installation directory and then generate the admin key in Git Bash
SSH-KEYGEN-T RSA
7. Copy the generated public key to the GIT server
SCP xxx/.ssh/id_rsa.pub [email protected]:/tmp/id_rsa.pub
8. Add readable permissions for Admin.pub
sudo chmod a+r/tmp/admin.pub
9. Download Gitolite
git clone git://github.com/sitaramc/gitolite
10. Switch user to Git to create bin in git directory to install Gitolite
mkdir ~/bin
11. Installing Gitolite
Gitolite/install-to ~/bin
12. Initializing the repository with the public key just copied
Bin/gitolite setup–pk/tmp/id_rsa.pub
13. The client can replicate the Gitolite-admin library for Gitolite management.
git clone [email protected]:gitolite-admin
The following article will talk about the management of Gitolite
Gitolite Server Setup