Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Using EGit to Push to Gerrit

On Fri, Oct 9, 2009 at 14:40, Chris Aniszczyk <zx@xxxxxxxxxxxxxxxxx> wrote:
> Has anyone successfully used EGit to push to Gerrit?
> I'm getting an evil error message... not sure how to debug yet :)

I think know what the problem is.  Sorry it took me so long to figure it out.

Gerrit validates that the committer email address of every single
commit you are uploading matches an email address it has on file in
your user account.  In Gerrit look at Settings > Identities, and then
look at your commits with `git log --format=fuller` and compare the
committer email field.  I think they don't match.

When they don't match Gerrit returns the status code "remote
rejected", but it also includes a message "you are not
blah@xxxxxxxxxxx".  Unfortunately EGit hid that message and only
showed the status code, when really the message was much more useful.

There are two ways to fix this:

1)  If the email address is a valid email address, you may register it
in Gerrit by going to Settings > Contact Information > Register New
Email.  Gerrit will send you a message with a confirmation link, you
activate that link to register the email address in your account.

2)  Change your Git configuration by setting and
to the correct values.  Then update your commit(s) to use these new
values.  If its only one commit use `git commit --amend --author "Your
Name <your@xxxxxxxxxxxxxxxxx>" ` to update both author and committer.
If its more than one commit you might want to dump them to patch files
with `git format-patch --stdout`, edit the From field to be correct,
then reimport on a new branch using `git am`.

Back to the top