开发者

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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜