Bitbucket failed to push branch

I am currently using Bitbucket server 4.11 and I encounter some push operation errors. I have set up branch permission to block any rewrite history operation. However, when I push a local develop branch to Bitbucket, it returns error and not allow me to do pushing.  The log shows "Rewrite history is not allowed for branch refs/heads/develop. Check your branch permissions configuration with the project administrator." However, when I do the same operation in another Bitbucket server project with the same setting and same branch permission, it succeeds. Please advise a solution to solve this error. Thank you.

1 answer

0 votes

Hello @Eric Chan,

As far as I can understand, you don't seem to be facing this issue in any other projects, so maybe comparing the project permissions between the one that does not work and the one that works can give you a clue of what is going on?

We do realize that you have checked branch permissions, but what about repository-level permissions or project-level permissions? Have you checked these as well?

What happens if you try to push to a different branch on the same repository?

In this Community thread the problem was solved by upgrading Bitbucket Server to 5.2. As you're running a prior version, can you try upgrading Bitbucket Server to the latest version and see if it works for you as well?

In addition to that, you mentioned you got a message about permissions in the logs. Can you paste the entire stacktrace here, obfuscating sensitive data? Maybe this can also be helpful.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,907 views 7 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you