dwax
dwax

Reputation: 401

Heroku deploy using bitbucket pipelines

I am trying to use the Bitbucket Pipelines feature to deploy a node.js project to Heroku. The script(taken from documentation) is:

image: node:6
clone:
  depth: full
pipelines:
  default:
    - step:
        script:
          - npm install
          - git push https://heroku:[email protected]/$HEROKU_APP_NAME.git master

I have set up the enviorment variables for the API key and project name however I am getting the following error:

+ git push https://heroku:[email protected]/$HEROKU_APP_NAME.git master
fatal: remote part of refspec is not a valid name in .git

What am I doing wrong here?

Upvotes: 4

Views: 3406

Answers (2)

Claude
Claude

Reputation: 41

This will work, but in my experience so far the token expires every 8 hours so you'll have to find a different solution.

Upvotes: 1

dwax
dwax

Reputation: 401

As it turned out when I copied the app_name environment variable I copied it with a trailing space which was the error.

Upvotes: 3

Related Questions