Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a working installation of Gitosis, but I'm wondering how the gitosis-serve command ever gets invoked! From all I can understand, when you connect through SSH as the git user (using git@host), the serve.py script gets invoked by the script generated by setuptools in /usr/bin/gitosis-serve, which then launches git-shell.

However, how is the git user's login connected to /usr/bin/gitosis-serve?

Thanks

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

I found the answer here. Basically, the /home/git/.ssh/authorized_keys file (generated by gitosis-init) maps each registered key to the gitosis-serve command!

share|improve this answer
    
So basically what I had said :) –  Jeremy Bouse Sep 3 '13 at 16:42
    
@JeremyBouse: if you look at the dates, you can see I answered before you did... –  André Caron Sep 9 '13 at 17:07
add comment

When you add an SSH key to gitosis-admin.git repository it is automatically checked out during the commit and the ~/.ssh/authorized_keys file for the gitosis user is updated to call gitosis-serve for the given SSH key. What repositories the user can actually manage is of course dependent on which repositories in the gitosis.conf that they have been given access.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.