Search code examples
gitlogging.htpasswd

Git log author name from htpasswd


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


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.