Client side | server side
1.Create "git" accout
Mac:
Finder/System preferences/User and Groups/
Linux:
$ sudo useradd -s /bin/bash -mr git
$ sudo adduser git sudo
$ sudo passwd git
2.Download and setup gitolite
Mac & Linux:
$ git clone git://github.com/ossxp-com/gitolite.git
$ cd gitolite/src
$ ./gl-easy-install git server admin
3. Generate ssh key and copy .pub to git account
$ ssh-keygen -t rsa
$ scp ~/.ssh/id_rsa.pub git@ip:~
4. Init gitosis using step3 ssh pub key
$ sudo -H -u git gitosis-init < /tmp/yourname.pub
$ cd ~/.ssh
$delete "command="gitosis-serve yourname",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty " in authorized_keys file
$ sudo chmod 755 /Users/git/repositories/gitosis-admin.git/hooks/post-update (mac)
5 set the git path to PATH env
$ touch ~/.bashrc
$ echo PATH=/usr/local/bin:/usr/local/git/bin:\$PATH > .bashrc
$ echo export PATH >> .bashrc
6. Manage gitosis
$ git clone git@192.168.1.100:repositories/gitosis-admin.git
$ add user in keydir and project member's in gitosis.conf