Using the example here https://confluence.atlassian.com/bitbucket/push-back-to-your-repository-962352710.html
It fails on the "git push" step
+ git push
remote: Permission denied to update branch develop.
To http://bitbucket.org/MY_COMPANY/MY_REPO
! [remote rejected] develop -> develop (pre-receive hook declined)
error: failed to push some refs to 'http://bitbucket.org/MY_COMPANY/MY_REPO'
I've tried a few suggestions from the pre-December 2018 "Pushing back to your repository" update, but I don't want to reconfigure the whole repo when the documentation says this should just work now.
git remote -v in the pipeline show that I'm definitely using the HTTPS endpoint, and git pull in the pipeline works.
OK, found the solution.
The section "Pushing back using alternative authentication methods" in https://confluence.atlassian.com/bitbucket/push-back-to-your-repository-962352710.html
Working for us now.
Do you have branch restrictions enabled on the target branch?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes.
Write access and pull requests are restricted to administrators. What user/group does the pipeline use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I've allowed "everybody" write permission to the branch, and the example works.
But we have a rule that says we can't allow that. So I'll go back to working with keys.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.