Bitbucket管道无法推送到heroku

问题描述 投票:1回答:1

我确实有一个react.js应用程序(create-react-app)我设置文件就像在官方文档中解释的那样,一切都很顺利但推送失败了这个特定的行

git push https://heroku[email protected]/$APP_NAME.git HEAD:master

bitbucket-pipelines.yml位于根文件夹中:

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

我做错了什么?这里的目标是在bitbucket平台上使用CI,但也将master提交推送到heroku存储库以自动化部署。

我得到的错误是:

remote: !   WARNING:
remote: !   Do not authenticate with username and password using git.
remote: !   Run `heroku login` to update your credentials, then retry the git command.
remote: !   See documentation for details: https://devcenter.heroku.com/articles/git#http-git-authentication
fatal: Authentication failed for 'https://heroku
reactjs git bitbucket-pipelines
1个回答
1
投票

首先,确保您的脚本不涉及git push git push https://heroku:。 它应该是git push https://heroku: ...

第二,作为described here,请务必使用你的HEROKU_API_KEY,由heroku authorizations --json返回的那个(字段“token”)

image: node:6
clone:
  depth: full
pipelines:
  default:
    - step:
        script:
          - npm install
          - npm test
          - git push https://heroku:[email protected]/$HEROKU_APP_NAME.git HEAD:master
© www.soinside.com 2019 - 2024. All rights reserved.