pushing a change to gerrit based on someone else's CL

1,186 views
Skip to first unread message

Michael Hudson-Doyle

unread,
Apr 21, 2016, 6:37:26 PM4/21/16
to golang-dev
Hi,

I wanted to push a change to gerrit that's based on a CL authored by
someone other than me (in this case
https://go-review.googlesource.com/#/c/22092), so I cherry-picked that
change onto master, made my changes and went to push, and got this:

(dwarf-compiler)mwhudson@aeglos:/opt/opensource/go/src$ git push
origin HEAD:refs/for/master
Counting objects: 50, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (50/50), done.
Writing objects: 100% (50/50), 17.65 KiB | 0 bytes/s, done.
Total 50 (delta 39), reused 0 (delta 0)
remote: Resolving deltas: 100% (39/39)
remote: Processing changes: refs: 1, done
remote:
remote: ERROR: In commit 2a41dbf2ea36aa75c6659a05ce7011f0baf694a0
remote: ERROR: author email address rib...@google.com
remote: ERROR: does not match your user account.
remote: ERROR:
remote: ERROR: The following addresses are currently registered:
remote: ERROR: michael...@canonical.com
remote: ERROR: michael...@canonical.com.test-google-a.com
remote: ERROR: michael...@gapps.canonical.com
remote: ERROR:
remote: ERROR: To register an email address, please visit:
remote: ERROR: https://go-review.googlesource.com/#/settings/contact
remote:
remote:
To https://go.googlesource.com/go
! [remote rejected] HEAD -> refs/for/master (invalid author)
error: failed to push some refs to 'https://go.googlesource.com/go'

If I go to the CL page and click "rebase". I get the same message.
I'm sure this used to work, has something changed in our gerrit
configuration?

Cheers,
mwh

Brad Fitzpatrick

unread,
Apr 21, 2016, 7:24:12 PM4/21/16
to Michael Hudson-Doyle, golang-dev
I'm pretty sure it's always been like this, unless you have the Forge Author permission.



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

Michael Hudson-Doyle

unread,
Apr 21, 2016, 9:42:37 PM4/21/16
to Brad Fitzpatrick, golang-dev
Ah OK. So there's no way to push a change based on someone else's
change? That's a bit of a shame.

Cheers,
mwh

Austin Clements

unread,
Apr 21, 2016, 9:45:07 PM4/21/16
to Michael Hudson-Doyle, Brad Fitzpatrick, golang-dev
You could change the author on the commit (e.g., using git commit --amend --reset-author). It would depend on the CL whether that's an appropriate thing to do or not.

Josh Bleecher Snyder

unread,
Apr 21, 2016, 9:49:56 PM4/21/16
to Michael Hudson-Doyle, Brad Fitzpatrick, golang-dev
You could git rebase -i, choose to reword the commit in question, and (a) add DO NOT REVIEW and indicate that it is a duplicate of CL NNN and (b) remove the Change-Id line. Then the hooks will generate a new Change-Id and Gerrit will create a new CL. Then you can abandon the duplicate CL when it is no longer needed.

Keith Randall

unread,
Apr 21, 2016, 10:01:10 PM4/21/16
to Josh Bleecher Snyder, Michael Hudson-Doyle, Brad Fitzpatrick, golang-dev
Irrespective of the mechanism, you need to make sure the original author has a CLA in place before submitting a CL on that person's behalf.  This is probably why our setup refuses this operation.

Reply all
Reply to author
Forward
0 new messages