Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

git push in pipeline fails

andrew lorien April 17, 2019

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

2 votes
Andrew Lorien April 25, 2019

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
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2019

Do you have branch restrictions enabled on the target branch?

andrew lorien April 22, 2019

Yes.

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

Andrew Lorien April 25, 2019

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
AUG Leaders

Atlassian Community Events