blob: a6690105d276058738de1ce1aa858c144e8155c3 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= invalid committer
Edwin Kempin35d0f392010-12-21 09:26:03 +01002
David Pursehouse221d4f62012-06-08 17:38:08 +09003For every pushed commit Gerrit verifies that the e-mail address of
Edwin Kempin35d0f392010-12-21 09:26:03 +01004the committer matches one of the registered e-mail addresses of the
5pushing user. If this is not the case pushing the commit fails with
David Pursehousec6fd5a62012-06-26 13:42:11 +09006the error message "invalid committer". This policy can be
Fredrik Luthanderb295eea2011-12-27 13:40:43 +01007bypassed by having the access right
8link:access-control.html#category_forge_committer['Forge Committer'].
Edwin Kempin35d0f392010-12-21 09:26:03 +01009
10This error may happen for two reasons:
Edwin Kempinddfc41a2011-05-06 10:32:05 +020011
12. incorrect configuration of the e-mail address on client or server
13 side
14. missing privileges to push commits that were committed by other
15 users
Edwin Kempin35d0f392010-12-21 09:26:03 +010016
17
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080018== Incorrect configuration of the e-mail address on client or server side
Edwin Kempin35d0f392010-12-21 09:26:03 +010019
David Pursehousec6fd5a62012-06-26 13:42:11 +090020If pushing to Gerrit fails with the error message "invalid committer"
21and you committed the change for which the push fails,
Edwin Kempin35d0f392010-12-21 09:26:03 +010022then either you have not successfully registered this e-mail address
23for your Gerrit account or the committer information of the pushed
24commit is incorrect.
25
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080026=== Configuration of e-mail address in Gerrit
Edwin Kempin35d0f392010-12-21 09:26:03 +010027
28Check in Gerrit under 'Settings -> Identities' which e-mail addresses
David Pursehouse221d4f62012-06-08 17:38:08 +090029you've configured for your Gerrit account. If no e-mail address is
Edwin Kempin35d0f392010-12-21 09:26:03 +010030registered go to 'Settings -> Contact Information' and register a new
31e-mail address there. Make sure you confirm your e-mail address by
32clicking on the link in the e-mail verification mail sent by Gerrit.
33
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080034=== Incorrect committer information
Edwin Kempin35d0f392010-12-21 09:26:03 +010035
36For every commit Git maintains the user who did the commit, the so
37called committer. Git computes the committer out of the Git
38configuration parameters 'user.name' and 'user.email'.
39
40----
41 $ git config -l
42 ...
43 user.name=John Doe
44 user.email=john.doe@example.com
45 ...
46----
47
48A commit done with the above Git configuration would have
49"John Doe <john.doe@example.com>" as committer.
50
51To see the committer information for existing commits do
52"git log --format=full":
53
54----
55 $ git log --format=full
56 commit cbe31bdba7d14963eb42f7e1e0eef1fe58698c05
57 Author: John Doe <john.doe@example.com>
58 Commit: John Doe <john.doe@example.com>
59
60 my commit
61
62----
63
64Check in Git that the committer information of the commit that should
65be pushed is correct. As explained above you can do this by
66'git log --format=full'. The committer should have the same e-mail
67address that you've configured for your Gerrit account. If the
68committer information is incorrect set the Git configuration
69parameters 'user.name' and 'user.email' to the correct values (you
70might want to set this globally by including the option '--global'):
71
72----
73 $ git config user.name "John Doe"
74 $
75 $ git config user.email john.doe@example.com
76 $
77----
78
79Now you should rewrite the commits for which the committer
80information is wrong. If only the last commit is affected you can do
81this by doing a 'commit --amend'. If you need to update the committer
82information for several commits it gets more complicated. In this
83case you have to do an interactive git rebase for the affected
84commits. While doing the interactive rebase you have to ensure that
85the commits are rewritten (e.g. by choosing 'reword' for all these
86commits and then confirming all the commit messages). Just picking
87all the changes will not work as in this case the committer is not
88rewritten. For further details about git rebase please check the
89link:http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html[Git documentation].
90
91
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080092== Missing privileges to push commits that were committed by other users
Edwin Kempin35d0f392010-12-21 09:26:03 +010093
David Pursehousec6fd5a62012-06-26 13:42:11 +090094If pushing to Gerrit fails with the error message "invalid committer"
95and somebody else committed the change for which the
Edwin Kempin35d0f392010-12-21 09:26:03 +010096push fails, then you have no permissions to forge the committer
97identity. In this case you may contact the project owner to request
Edwin Kempin4053b212014-07-08 08:54:24 +020098the link:access-control.html#category_forge_committer['Forge Committer']
99access right or ask the maintainer to commit this change on the author's
100behalf.
Edwin Kempin35d0f392010-12-21 09:26:03 +0100101
102
103GERRIT
104------
105Part of link:error-messages.html[Gerrit Error Messages]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700106
107SEARCHBOX
108---------