Error "Rebase failed" when user is not the MR author and "Reject unverified users" is enabled

Summary

Error "Rebase failed: Rebase locally, resolve all conflicts, then push the branch. Try again." when a user is not the MR author and tries to rebase.

And when Push rule "Reject unverified users" is enabled on the project.

Steps to reproduce

In a project with the settings "merge fast forward" and the push rule "Reject unverified users" enabled.

  1. Create a new branch
  2. Create a MR
  3. Add a commit in the target branch
  4. The button rebase will appear in the MR
  5. If a different user ( a user that is not the MR author) is trying to rebase: the rebase fails with Rebase failed: Rebase locally, resolve all conflicts, then push the branch. Try again.

It seems like the source branch for a merge request created by someone can only be rebased by that individual.

Workarounds

You can either:

  • Disable "Reject unverified users" push rule.
  • The user who created the MR can rebase successfully.

What is the current bug behavior?

What is the expected correct behavior?

The rebase should succeed as the other users is a member of the project.

Relevant logs and/or screenshots

Screenshot_2024-03-07_at_10.33.58

Output of checks

This bug happens on GitLab.com /label reproduced on GitLab.com

Assignee Loading
Time tracking Loading