我在gitlab中维护我的代码。我已经把我的网站放在火炉里了。我想实现从gitlab到firebase的持续部署。
这里是我当前的YML脚本
image: node:alpine
deploy_production:
stage: deploy
environment: Production
only:
- master
script:
- npm install
- npm i -g firebase-tools
- npm build
- firebase deploy --non-interactive --token "1//0gUT4kVkAzDa9CgYIARAAGBASNwF-L9IrGNXptJQ0YybVEjtYCttSystVDdE35i-IzSm3MwcnxDyfwT2FdQPCvdUa4o5GOVVUyrA"我从Gitlab作业中得到以下错误
Error: Authorization failed. This account is missing the following required permissions on project <project-id>:
firebase.projects.get
firebasehosting.sites.update
ERROR: Job failed: exit code 1发布于 2019-10-24 01:35:10
我找到了解决办法。
复制以下代码并将其粘贴到.yml文件中:
image: node:alpine
deploy_production:
stage: deploy
environment: Production
only:
- master
script:
- npm install
- npm i -g firebase-tools
- firebase deploy --non-interactive --token "<token>" --project <project ID>对于完整的教程,您可以访问这个链接。
https://stackoverflow.com/questions/58391763
复制相似问题