DoctorMoose
DoctorMoose

Reputation: 35

How do I set the Gerrit 'Push merge commit' permission

I'm told that, in gerrit, if I want to submit merges (Instead of rebasing), then I need to allow 'push merge commit' permissions. Right now I get the message: (You are not allowed to upload merges).

I can't seem to find anywhere that actually states HOW I set this permission. Is it a setting on gerrit? Something in the config file etc.?

So where do I set the 'Push merge commit' permission?

Thank you.

Upvotes: 1

Views: 5964

Answers (1)

Using the Gerrit GUI

  1. Click on "Projects"

  2. Click on "List"

  3. Use the "Filter" field to find the desired project

  4. Click on the project name

  5. Click in "Access"

  6. Click in "Edit"

  7. In "refs/for/refs/*" section add "Push Merge Commit" ALLOW permission to the desired group

  8. Click in "Save Changes"

Note: you need to have "Administrate Server" rights.

More info: https://gerrit-review.googlesource.com/Documentation/access-control.html#category_push_merge

To be more specific, add the following lines in your project.config file

[access "refs/for/refs/*"]
  pushMerge = group <your-id-here>

Upvotes: 4

Related Questions