I enabled branch permissions so that people have to merge from a pull request to get code onto master. However, when we tried to merge and push from our Git client (so we can use different merge strategies and clean up the branch with interactive rebase), we got an error:
remote: permission denied to update branch master
To bitbucket.org:.../....git
! [remote rejected] master -> master (pre-receive hook declined)
A pull request was already open for this and we were able to merge online, but should it still work from outside Bitbucket as long as the PR was approved?
It won't work if the user attempting to push directly to master doesn't have permission to push directly to master. The contents of the push and the existence of a pull request aren't really relevant in that case.
Thanks for clarifying. I wasn't clear from the docs whether the PR had to be merged via web before.
I was hoping that the pre-commit hook could look up the existience of an open pull request that was being merged in, then allow the merge commit through if there was a PR in a similar way to how pull requests are automatically closed and updated when a corresponding merge is pushed. The bummer with this current limitation is we can only use the merge strategies that the web UI allows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.