>git clone git://eagain.net/gitosis.git
>cd gitosis >sudo python setup.py install
add user 'git' (server side)
>sudo adduser git
>sudo passwd git
generate a admin public key (from client side) and put on server side
the key is put on /home/git/id_rsa.pub
Initialize gitosis (server side)
>su git
>cd /home/git
>gitosis-init < id_rsa.pub
>rm id_rsa.pub
Now we must set some directory and file permissions to let sshd see the new authorized_keys file.
>chmod 700 /home/git/.ssh
>chmod 644 /home/git/.ssh/authorized_keys
Make sure post-update is executeable
Cole on November 19, 2009 03:53 PM
I was still getting the ERROR:gitosis.serve.main:Repository read access denied problem after rechecking everything that was said here. I finally found the answer on stackoverflow. Make sure your repositories/gitosis-admin.git/hooks/post-update is executable. Enjoy
prevent "ERROR:gitosis.serve.main:Repository read access denied"
clone gitosis from server (client side)
>git clone git@server.com:gitosis-admin.git
edit gitosis.conf
>cd gitosis-admin
>vim gitosis.conf
(refer following link to modify conf file)
http://nfocipher.com/index.php?op=ViewArticle&articleId=12&blogId=1
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
http://theswarmintelligence.blogspot.com/2009/11/creating-gitosis-repository-and-adding.html
Ready to git hosting on remote!
沒有留言:
張貼留言