Invalid Committer - Failed to Push

5,096 views
Skip to first unread message

Ryan

unread,
Mar 19, 2009, 12:16:29 PM3/19/09
to Repo and Gerrit Discussion
I am at a point in which I really need some help. I have tried
everything I can think of to get this working.

I have a brand new repo and have installed gerrit.

I do a:

git push ssh://notroot@ah-git:29418/ClientArchitecture HEAD:refs/for/
master

The error message I get:

To ssh://notroot@ah-git:29418/ClientArchitecture
! [remote rejected] HEAD -> refs/for/master (invalid committer
not...@ah-git.MYNET.DOMAIN.COM)
error: failed to push some refs to 'ssh://notroot@ah-git:29418/
ClientArchitecture'

- The repo is setup with permissions for read/write access for all
users.
- In gerrit admin interface, I set "anonymous" users to full
permissions for everything (as a desperate attempt to get this
working).
- I have tested the ssh login (ssh -p 29418 sshusername@hostname) as
described in the "Testing Your SSH Connection" on gerrit installation
page. This test reveals the results as the web page describes.

System Setup:

gerrit-2.0.4
jetty-6.1.14
ubuntu server 8.10
setup apache using "basic" authentication

Details:

- I have a registered user "notroot" in gerrit as well and it has the
email not...@domain.com
- I tried changing the ssh user name to not...@mynet.domain.com to
see if that would work but still get the same issue.
- I found that this error message must come from gerrit just am not
understanding what needs to be done to fix it.

In addition to this question - is there a good way to see logging from
gerrit? I do not see any errors in the jetty /logs.

Shawn Pearce

unread,
Mar 19, 2009, 12:26:58 PM3/19/09
to repo-d...@googlegroups.com
On Thu, Mar 19, 2009 at 09:16, Ryan <ralb...@gmail.com> wrote:
>
> git push ssh://notroot@ah-git:29418/ClientArchitecture HEAD:refs/for/
> master
>
> To ssh://notroot@ah-git:29418/ClientArchitecture
> ! [remote rejected] HEAD -> refs/for/master (invalid committer
> not...@ah-git.MYNET.DOMAIN.COM)
...

> - I have a registered user "notroot" in gerrit as well and it has the
> email not...@domain.com

That's your problem.

Your git tools chose "not...@ah-git.MYNET.DOMAIN.COM" as your email
address, but Gerrit thinks the only valid address for you is
"not...@domain.com", so its rejecting the email as recorded by Git in
the commit object.

Use git config to set your name,email, e.g.:

git config --global user.name "Shawn Pearce"
git config --global user.email "s...@google.com"

Then recreate the commits (you can do this by rebasing them, or if its
only one commit, use git commit --amend) so that the committer field
shows your correct email address. Check with "git log --pretty=full"
to make sure.

Gerrit performs this "committer must match user" test to ensure
attribute is accurate when the commits are downloaded through Git.

If you need multiple emails, you can add them in Settings > Contact
Information, but they must be valid emails as Gerrit sends a
confirmation code that must be completed. If you are the admin, you
can also insert any old string into the account_external_ids table if
you want.

> In addition to this question - is there a good way to see logging from
> gerrit? I do not see any errors in the jetty /logs.

Gerrit logs to jetty's stdouterr log when it has something relevant to
say. Errors like the above are considered user level errors and
aren't recorded for the administrator. Errors like "oh my the
database disappeared" are admin level errors, and get logged to
stdouterr when they occur.

Shawn Pearce

unread,
Mar 19, 2009, 1:28:21 PM3/19/09
to repo-d...@googlegroups.com
On Thu, Mar 19, 2009 at 09:16, Ryan <ralb...@gmail.com> wrote:
>
> System Setup:
>
> gerrit-2.0.4

That's ooooooold in gerrit terms. We're on 2.0.7 right now, with
2.0.8 scheduled for release on Monday. Bugs are fixed weekly. I
would encourage you to try and stay current, in my humble opinion the
more recent builds are more stable than the older ones.

Ryan

unread,
Mar 20, 2009, 9:38:34 AM3/20/09
to Repo and Gerrit Discussion
Shawn -

Amazing! Thank you so much! I am so thankful for the quick
response! I have upgraded as you recommended.

- Ryan

P.S. I hope to be at a place eventually here to help fix bugs, etc.
First things first though :-)

On Mar 19, 12:28 pm, Shawn Pearce <s...@google.com> wrote:
Reply all
Reply to author
Forward
0 new messages