Gerrit: remote rejected (you are not allowed to upload merges) even though I allowed "Push merge commit"
This is a bug in gerrit. The workaround is to create another reference named refs/for/refs/heads/<BRANCH_NAME>
, and allow Push Merge Commit
on it.
To be more specifically, add following lines in your project.config
file
[access "refs/for/refs/*"]
pushMerge = group <your-id-here>
Workaround which was more suitable for me as it doesn't involve knowing branches is to allow Push Merge Commit to refs/for/refs/heads/*
. You probably won't want to be doing changing these for every branch specifically.
It worked for me by this way(after this link):
- git stash
- git pull --rebase
- git push
- git pull
- git stash pop