Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,248
Community Members
 
Community Events
168
Community Groups

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.

 

bitbucker-pipeline.yml

pipelines:
  branches:
    master:
      - step:
          script:
          - 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

deploy.bash

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

 

0 comments

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events