Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Gitosis is able to authenticate users based on public/private key pair. It is able to find out which user is currently committing. However, the user name and email is taken from the client's Git configuration ('git config' etc.), which can be set to arbitrary values. Is there any way to associate user names and emails with their public keys and then make Gitosis uses these names and emails as the name and email of the committer?

Edit: I do not care if I will use Gitosis or WebDAV or some other alternative to share the repository. It just seems to me that none of the available methods supports this enforcement of using some kind of "correct" user name and email. If there exists some alternative, please tell me about it.

share|improve this question
up vote 0 down vote accepted

You will have to do it yourself. A good starting point is to mix and shake the two examples "Enforcing a Specific Commit-Message Format" and "Enforcing a User-Based ACL System" of this online book

share|improve this answer
Thanks for information. It is pretty long time since I asked this question and since then I started using Gitolite instead of Gitosis, and I was able to do something similar to what you suggest. – k21 Nov 28 '10 at 9:41

Your Answer


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.