Re: invalid committer for refs/meta/config (adding a rules.pl)

3,038 views
Skip to first unread message

Shawn Pearce

unread,
Mar 19, 2013, 3:12:52 PM3/19/13
to Oluf Lorenzen, repo-discuss
On Tue, Mar 19, 2013 at 1:48 AM, Oluf Lorenzen
<desoxyrebon...@gmail.com> wrote:
> i have a parent-project and try to add a rules.pl:
>
> git clone ssh://x@y:29418/z.git
> git fetch origin refs/meta/config:refs/remotes/origin/meta/config
> git checkout meta/config
> cp /tmp/rules.pl ./
> git add rules.pl
> git commit -m 'add rules'
> git push origin HEAD:refs/meta/config
>
> Then i get an error-message, that i may not add the previous commit (done via web-gui) because "the commiter email address is wrong".
>
> my new commit:
> > * 70bbb67 - (HEAD, meta/config) add rules (5 minutes ago) <Oluf Lorenzen>
> old commit:
> > * 1b801e0 - (origin/meta/config) allow pushing to config (13 minutes ago) <Oluf Lorenzen>
>
> error message:
> > remote: ERROR: In commit 1b801e0dbefad73f0895e9cc2d1d7080f3873b75
> > remote: ERROR: committer email address gerrit@y
> > remote: ERROR: does not match your user account.
> > remote: ERROR:
> > remote: ERROR: The following addresses are currently registered:
> > remote: ERROR: foo
> > remote: ERROR: bar
> > remote: ERROR:
> > remote: ERROR: To register an email address, please visit:
> > remote: ERROR: https://y/gerrit/#/settings/contact
>
> Any ideas what to do now?

Are you sure your new commit's parent matches the tip of
refs/meta/config from the server? It seems like there is an extra edit
locally, which makes no sense given the command sequence you showed.

Mihai Rusu

unread,
Mar 19, 2013, 5:48:31 PM3/19/13
to Oluf Lorenzen, repo-d...@googlegroups.com
On Tue, Mar 19, 2013 at 01:48:22AM -0700, Oluf Lorenzen wrote:
> Hi,
>
> i have a parent-project and try to add a rules.pl:
>
> git clone ssh://x@y:29418/z.git

Not an answer to your question but note that using "git clone" just to
have a repository where to fetch, modify and update refs/meta/config
is too much overhead. "git clone" will add the remote as "origin" and
then fetch refs/heads/* and refs/tags* from the remote repository,
potentially fetching a lot more data then refs/meta/config (which is not
fetched).

Try instead:
$ git init repo && cd repo && git remote add origin ssh://x@y:29418/z.git
... much faster ...
> Best regards,
> Oluf Lorenzen
>
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Mihai Rusu

Keith Pine

unread,
Mar 21, 2013, 5:38:51 PM3/21/13
to repo-d...@googlegroups.com, Oluf Lorenzen
I can confirm this behavior with Gerrit 2.5.2. It did not happen on previous versions. A temporary workaround is to add Forge Committer Identity to refs/meta/config for the project being modified. Gerrit will then allow the push.

If I try to push when the new commit's parent is out-of-date, I get an entirely different error message--one that makes sense--than the one about the committer email:

 ! [rejected]        HEAD -> refs/meta/config (non-fast-forward)
error: failed to push some refs to '<snip>'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and merge the remote changes
hint: (e.g. 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

In case it matters, the permissions for the parent project's refs/meta/config are:
  • Read - Allow - Registered users
  • Push - Project owners
And the All-Projects' refs/meta/config permissions are:
  • Read - Allow - Administrators
  • Read - Allow - Project owners
 The project in question does not set any permissions and just inherits from the parents. This has also occurred on different projects, but they do share the same parent.

Saša Živkov

unread,
Mar 22, 2013, 8:06:51 AM3/22/13
to Oluf Lorenzen, repo-d...@googlegroups.com


On Tue, Mar 19, 2013 at 9:48 AM, Oluf Lorenzen <desoxyrebon...@gmail.com> wrote:
Hi,

i have a parent-project and try to add a rules.pl:

git clone ssh://x@y:29418/z.git
git fetch origin  refs/meta/config:refs/remotes/origin/meta/config
git checkout  meta/config

Based on your fetch command, this should be:
git checkout origin/meta/config

Or, was this just a typo in your example?

cp /tmp/rules.pl ./
git add rules.pl
git commit -m 'add rules'
git push origin HEAD:refs/meta/config

Then i get an error-message, that i may not add the previous commit (done via web-gui) because "the commiter email address is wrong".

my new commit:
> * 70bbb67 - (HEAD, meta/config) add rules (5 minutes ago) <Oluf Lorenzen>
old commit:
> * 1b801e0 - (origin/meta/config) allow pushing to config (13 minutes ago) <Oluf Lorenzen>

error message:
> remote: ERROR:  In commit 1b801e0dbefad73f0895e9cc2d1d7080f3873b75
> remote: ERROR:  committer email address gerrit@y
> remote: ERROR:  does not match your user account.
> remote: ERROR:
> remote: ERROR:  The following addresses are currently registered:
> remote: ERROR:    foo
> remote: ERROR:    bar
> remote: ERROR:
> remote: ERROR:  To register an email address, please visit:

Any ideas what to do now?

Mihai Rusu

unread,
Mar 22, 2013, 5:00:21 PM3/22/13
to Keith Pine, repo-d...@googlegroups.com, Oluf Lorenzen
> previous versions. A temporary workaround is to add *Forge Committer
> Identity* to refs/meta/config for the project being modified. Gerrit will
> then allow the push.

I can confirm the bug on our internal Gerrit too (2.6-rc0 based). Is
there a bug to track this issue?

>
> If I try to push when the new commit's parent is out-of-date, I get an
> entirely different error message--one that makes sense--than the one about
> the committer email:
>
> ! [rejected] HEAD -> refs/meta/config (non-fast-forward)
> error: failed to push some refs to '<snip>'
> hint: Updates were rejected because a pushed branch tip is behind its remote
> hint: counterpart. Check out this branch and merge the remote changes
> hint: (e.g. 'git pull') before pushing again.
> hint: See the 'Note about fast-forwards' in 'git push --help' for details.
>
>
> In case it matters, the permissions for the parent project's
> refs/meta/config are:
>
> - Read - Allow - Registered users
> - Push - Project owners
>
> And the All-Projects' refs/meta/config permissions are:
>
> - Read - Allow - Administrators
> - Read - Allow - Project owners
>
> The project in question does not set any permissions and just inherits
> from the parents. This has also occurred on different projects, but they do
> share the same parent.
>
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Mihai Rusu

Shawn Pearce

unread,
Mar 22, 2013, 7:44:22 PM3/22/13
to Mihai Rusu, Keith Pine, repo-discuss, Oluf Lorenzen
On Fri, Mar 22, 2013 at 2:00 PM, Mihai Rusu <di...@google.com> wrote:
>> > > error message:
>> > > > remote: ERROR: In commit 1b801e0dbefad73f0895e9cc2d1d7080f3873b75
>> > > > remote: ERROR: committer email address gerrit@y
>> > > > remote: ERROR: does not match your user account.
>> > > > remote: ERROR:
>> > > > remote: ERROR: The following addresses are currently registered:
>> > > > remote: ERROR: foo
>> > > > remote: ERROR: bar
>> > > > remote: ERROR:
>> > > > remote: ERROR: To register an email address, please visit:
>> > > > remote: ERROR: https://y/gerrit/#/settings/contact
>> > >
>> > > Any ideas what to do now?
>> >
>> > Are you sure your new commit's parent matches the tip of
>> > refs/meta/config from the server? It seems like there is an extra edit
>> > locally, which makes no sense given the command sequence you showed.
>>
>> I can confirm this behavior with Gerrit 2.5.2. It did not happen on
>> previous versions. A temporary workaround is to add *Forge Committer
>> Identity* to refs/meta/config for the project being modified. Gerrit will
>> then allow the push.
>
> I can confirm the bug on our internal Gerrit too (2.6-rc0 based). Is
> there a bug to track this issue?

No bug, please feel free to file one. What I suspect is happening here
is refs/meta/config is not being considered as an existing source
branch. For performance optimization reasons Gerrit's ReceiveCommits
stopped looking at every reference and IIRC only looks at refs/heads/
names. So its probably not considering the fact that it already has
these commits.

Mihai Rusu

unread,
Mar 22, 2013, 9:17:15 PM3/22/13
to Shawn Pearce, Keith Pine, repo-discuss, Oluf Lorenzen
Yeah, that makes sense. Although looking at the failed push output:
...
Counting objects: 5, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 438 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 1, done

It seems to be uploading only 3 objects which would be the commit, tree
and blob. Not sure about the counting 5 objects part.

Filed https://code.google.com/p/gerrit/issues/detail?id=1842, thanks!

--
Mihai Rusu

Devika Shankar

unread,
Oct 18, 2016, 3:18:43 PM10/18/16
to Repo and Gerrit Discussion, desoxyrebon...@gmail.com
Hi There, 
I am having the same issue since last week, I could not fix it. I did change "git config --global user.name "user.name"
        git config --global user.email "user...@company.com"
        git commit --amend --no-edit

Still having this issue. Infact, I am trying to push to remote server located in china using different account other than mine (Cause in that server I have only one account privileged to push, so I am setting that as global when I push). I am writing a automation script which automatically pushes to China server, when developer gives code review +2. So far, I am having problem with author and committer name difference. Even though after resetting global username and email I am not able to see author and commiter same name same.  When I do 'git log' author and committer are different, so it is not changing at all, I donot know what else I can try?  Checking on 'git config -l" shows correct username and email of global what I set it. 
Please help me on this.
Here is the error message:

remote: ERROR:  In commit 145e12a05a4882e618ed58f59e11861849ad64a0
remote: ERROR:  committer email address m...@company.com
remote: ERROR:  does not match your user account.
remote: ERROR:
remote: ERROR:  The following addresses are currently registered:
remote: ERROR:    china...@company.com
remote: ERROR:
remote: ERROR:  To register an email address, please visit:
remote: 
remote: 
 ! [remote rejected] FETCH_HEAD -> refs/for/branchname(invalid committer)
error: failed to push some refs to 'ssh://remote.server.com:22222/framework/coop'
fatal: "If87abbf6645411c6ff91d78e21716a671b285b2f" no such change
program finished with exit code 1
Thanks
Devika

Edwin Kempin

unread,
Oct 19, 2016, 2:29:52 AM10/19/16
to Devika Shankar, Repo and Gerrit Discussion, desoxyrebon...@gmail.com
On Tue, Oct 18, 2016 at 8:29 PM, Devika Shankar <devi...@gmail.com> wrote:
Hi There, 
I am having the same issue since last week, I could not fix it. I did change "git config --global user.name "user.name"
        git config --global user.email "user...@company.com"
        git commit --amend --no-edit

Still having this issue. Infact, I am trying to push to remote server located in china using different account other than mine (Cause in that server I have only one account privileged to push, so I am setting that as global when I push). I am writing a automation script which automatically pushes to China server, when developer gives code review +2. So far, I am having problem with author and committer name difference. Even though after resetting global username and email I am not able to see author and commiter same name same.  When I do 'git log' author and committer are different, so it is not changing at all, I donot know what else I can try?  Checking on 'git config -l" shows correct username and email of global what I set it. 
Please help me on this.
Changing your git configuration affects only new commits that you create. If the committer information is wrong in old commits, you must rewrite these commite after your git configuration was fixed. You can rewrite commits by amending them or using interactive rebase.
 

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edwin Kempin

Software Engineer

eke...@google.com

+16502534437

Google Germany GmbH

Dienerstraße 12

80331 München


Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

      

This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.

Reply all
Reply to author
Forward
0 new messages