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

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

I cannot push back to branch from pipelines.

What am I missing as, in certain repositories, I cannot push back to branch from within the bitbucket pipeline?

I have taken the bitbucket-pipeline.yml from here.
And edited it for my purposes so it eventually looks like this (no npm publishing step or deployment)

image: node:10.15.1

    - step:
        name: Build and Test
          - npm install
    - step:
        name: Publish
          - npm version minor -m "Upgrade to %s [skip ci]"
          - git push && git push --tags


Everything works fine until I limit write permission to a single user. Than pipeline fails with error.

remote: Permission denied to update branch publishing.

This happens in the company bitbucket account. No such problem appears on my personal free bitbucket account.
In both cases

  • I created the repo myself. only for the sake of the experiment [however the company repo has additional owner field specified that equals to organization name]
  • I limited write permissions to one specific user (this is myself)
  • I've taken pipeline ssh and pasted it to ssh keys of the very user that has write access
  • Pasted key has never bees used

I followed these steps to do setup the ssh keys: (link :

Probably the most straightforward order of operations would be:

  1. Create a bot user account in BB

  2. As a repo admin, give the bot user account write permission to the repository in Repo settings > general > user and group access
  3. Go into Repo settings > Pipelines > SSH keys

  4. Generate a key pair and then copy the public key (this is the key pipelines will use to identify itself)

  5. Switch to the bot account and navigate to Bitbucket settings >Security >  SSH keys

  6. Paste public key (we are giving the bot the same ID that we are using for pipelines)


In above steps I skipped creating bot account, I made myself 'the bot'. However, as in working solution, the key is never used I am not sure if it is anyhow connected.



0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

🍂📹 Apptoberfest demo contest roundup: vote for your favorite demos!

Hi Community! The submissions are in (and listed below) for the 🍻🍂Apptoberfest🍂🍻 Demo Competition and it’s time for you to place your votes for the best: Analytics & reporting app demo ...

111 views 2 11
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