How to change owner of a gerrit change

4,731 views
Skip to first unread message

Edelweiss

unread,
Jun 30, 2011, 1:23:09 PM6/30/11
to Repo and Gerrit Discussion
I am making a tool for programmatic code change integration across
multiple branches.
I am cherry-picking a change from branch A to branch B and then
pushing the change in branch B to gerrit for review. I was able to
preserve Author and Commiter from change in branch A. I am, however,
having troubles with faking the Owner of the change. I would like the
Owner be the same as Commiter.

Shawn Pearce

unread,
Jul 1, 2011, 10:13:28 AM7/1/11
to Edelweiss, Repo and Gerrit Discussion

You can't.

The only way to fake the owner is to use the suexec command in
Gerrit's SSH daemon to become another user, and execute `git
receive-pack PROJECT.git` as the command. You can specify the command
line from the client with `git push --receive-pack="suexec ... "`.
There are issues with using suexec, like the end-user must login as
"Gerrit Code Review" and must present an SSH key that is on a special
authorized keys list that grants super-Administrator privileges.

Reply all
Reply to author
Forward
0 new messages