It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

git push in pipeline fails

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.

2 answers

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.

0 votes
jredmond Atlassian Team Apr 18, 2019

Do you have branch restrictions enabled on the target branch?

Yes.

Write access and pull requests are restricted to administrators.  What user/group does the pipeline use?

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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

659 views 0 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you