问题描述
我确实有一个react.js应用程序(create-react-app),我按照官方文档中的说明设置了文件,一切正常,但在此特定行的推送失败
I do have a react.js app (create-react-app) I setup the file just like explained in the official docs, everything went good but the push failed with this specific line
bitbucket-pipelines.yml位于根文件夹上:
The bitbucket-pipelines.yml is on the root folder:
image: node:6
clone:
depth: full
pipelines:
default:
- step:
script:
- npm install
- npm test
- git push git push https://heroku:$API_KEY@git.heroku.com/$APP_NAME.git HEAD:master
我做错了什么?这里的目标是在bitbucket平台上使用CI,而且还将主提交提交到heroku存储库中以自动执行部署.
What I'm doing wrong?The goal here is to use the CI on bitbucket platform but also push master commits to heroku repository to automate deploys.
我得到的错误是:
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
推荐答案
首先,确保您的脚本不涉及git push git push https://heroku:
.
应该是git push https://heroku:
...
First, make sure your script does not involve git push git push https://heroku:
.
It should be git push https://heroku:
...
其次,如此处所述,请确保使用您的HEROKU_API_KEY,它是heroku authorizations --json
(字段"token
")返回的那个
Second, as described here, make sure to use your HEROKU_API_KEY, the one returned by heroku authorizations --json
(field "token
")
image: node:6
clone:
depth: full
pipelines:
default:
- step:
script:
- npm install
- npm test
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:master
这篇关于Bitbucket管道无法推送到Heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!