Question

we want to use git and one very important thing would be that if someone is committing something we need to know who exactly was it. Since we are accessing git via https we need to put the htpasswd login information in the git commit logs. Is this possible?

Regards

Phillip

Was it helpful?

Solution

With a wrapper like gitosis or gitolite, you can control if the user has correctly set his/her username/email, and only allow those commits.

See "Git/gitosis: How to check validity of user name and email?".

That approach is obviously for a "central" Git repo server, since it would be the one with access to the htpasswd file.
All user Git clients can still set their username how they see fit, but their commits will be rejected when pushed to that particular server.

OTHER TIPS

Gitolite will work just fine (certainly for centralised repo push/pull; the custom commands might be a little trickier) using Git http-backend. See https://github.com/sitaramc/gitolite/blob/pu/doc/http-backend.mkd for the documentation on how to do it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top