| suexec - Execute a command as any registered user account. |
| -i SITE_PATH/etc/ssh_host_rsa_key |
| "Gerrit Code Review@localhost" |
| The suexec command permits executing any other command as any other |
| suexec can only be invoked by the magic user `Gerrit Code Review`, |
| or any user granted granted the link:access-control.html#capability_runAs[Run As] |
| capability. The run as capability is permitted to be used only if |
| link:config-gerrit.html[auth.enableRunAs] is true. |
| Email address of the user you want to impersonate. |
| Hostname and port of the machine you want to impersonate |
| Gerrit command you want to run. |
| Caller must be the magic user Gerrit Code Review using the SSH |
| daemon's host key, or a key on this daemon's peer host key ring, |
| or a user granted the Run As capability. |
| This command is intended to be used in scripts. |
| Approve the change with commit c0ff33 as "Verified +1" as user bob@example.com |
| $ sudo -u gerrit ssh -p 29418 \ |
| -i site_path/etc/ssh_host_rsa_key \ |
| "Gerrit Code Review@localhost" \ |
| gerrit approve --verified +1 c0ff33 |
| Part of link:index.html[Gerrit Code Review] |