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

pipeline failing, not able to push changes to heroku

I have been trying to push my changes to heroku app deployment platform. I am exactly what is wrong with it. I am getting this error message which pipeline fails :

+ bash ./deploy.bash origin 
Initializing push to the specified environment: origin
Permission denied (publickey).
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.

I have generated SSH key on my machine. Uploaded public key to heroku account and private key in my bitbucket account as an environment variable.



      - step:
          - mkdir -p ~/.ssh
          - cat known_hosts >> ~/.ssh/known_hosts
          - (umask 077; echo $MY_SSH_KEY | base64 -di > ~/.ssh/my_ssh_key)
          - bash ./deploy.bash origin


MESSAGE="Initializing push to the specified environment: $1"

if [ $1 == "origin" ]; then
echo $MESSAGE git push $1 $BITBUCKET_BRANCH:master else echo "The specified environment is not valid. Use \"origin\"." fi




Log in or Sign up to comment
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,930 views 10 16
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