0

我正在尝试通过 Wercker 自动部署到 Firebase 托管,但我不断收到此错误。

按照本教程

https://medium.com/@pradeep1991singh/integrate-wercker-with-bitbucket-firebase-and-slack-7eb3bc38543d

堆栈跟踪

> export WERCKER_STEP_ROOT="/pipeline/script-5ea4a2c6-b11f-4972-991a-eec61b3d43af"
export WERCKER_STEP_ID="script-5ea4a2c6-b11f-4972-991a-eec61b3d43af"
export WERCKER_STEP_OWNER="wercker"
export WERCKER_STEP_NAME="script"
export WERCKER_REPORT_NUMBERS_FILE="/report/script-5ea4a2c6-b11f-4972-991a-eec61b3d43af/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/script-5ea4a2c6-b11f-4972-991a-eec61b3d43af/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-5ea4a2c6-b11f-4972-991a-eec61b3d43af/artifacts"
source "/pipeline/script-5ea4a2c6-b11f-4972-991a-eec61b3d43af/run.sh" < /dev/null
[2017-08-15T13:38:45.071Z] ----------------------------------------------------------------------
[2017-08-15T13:38:45.076Z] Command:       /usr/local/bin/node /usr/local/bin/firebase deploy --project --token --debug
[2017-08-15T13:38:45.076Z] CLI Version:   3.9.2
[2017-08-15T13:38:45.076Z] Platform:      linux
[2017-08-15T13:38:45.076Z] Node Version:  v7.10.1
[2017-08-15T13:38:45.077Z] Time:          Tue Aug 15 2017 13:38:45 GMT+0000 (UTC)
[2017-08-15T13:38:45.077Z] ----------------------------------------------------------------------
[2017-08-15T13:38:45.091Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2017-08-15T13:38:45.091Z] > no authorization credentials were supplied or found

⚠  Your CLI authentication needs to be updated to take advantage of new features.
⚠  Please run firebase login --reauth
[2017-08-15T13:38:45.093Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
[2017-08-15T13:38:45.093Z] > no authorization credentials were supplied or found
4

1 回答 1

0

该问题与 Wercker.yml 文件有关。步骤未正确定义,似乎环境变量未正确读取。

缩小问题范围的步骤

  1. 在本地注销 Firebase,然后尝试执行 firebase 列表 - 应该会出错
  2. 尝试使用 --token 传递令牌,如果令牌有效,将获得所有有效项目的列表。
  3. 获取有效的项目名称和令牌,然后在 yml 中对其进行硬编码并尝试一次以确保构建正确执行
  4. 最后,当一切正常时,公开为受保护的变量,一切都像魅力一样工作!!。
于 2017-08-16T03:00:09.873 回答