Using git hook, how can I force or verify the user id?

I am trying to configure a gitolite server. One problem that I find annoying in git is that the username is not checked when compiling the code.

This can lead to a possible “identity phishing” when user1 can commit some dummy code and set user2 as the username. Then we will blame user2.

I am looking for a way to check or make the username be compatible with the committer ID.

+1
source share
2 answers

You can sign your commits using: git commit -S(only available with git 1.7.9)

git , .

: http://phreaknerd.wordpress.com/2012/02/09/signing-git-commits-with-your-gpg-key/

+4

git hook ref. , , , , (, , ).

Gitolite env , , .

+1

Source: https://habr.com/ru/post/1543502/


All Articles