【问题标题】:Unable to Deploy Cloud Functions - Permission denied to enable service [artifactregistry.googleapis.com]无法部署云功能 - 启用服务的权限被拒绝 [artifactregistry.googleapis.com]
【发布时间】:2022-12-04 08:21:56
【问题描述】:

我正在尝试部署默认测试功能来检查一切是否正常。

const functions = require("firebase-functions");

exports.helloWorld = functions.https.onRequest((request, response) => {
  functions.logger.info("Hello logs!", {structuredData: true});
  response.send("Hello from Firebase!");
});

但是当我运行firebase deployfirebase deploy --only functions 时,出现以下错误:

i  artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
!  artifactregistry: missing required API artifactregistry.googleapis.com. Enabling now...
Error: HTTP Error: 403, Permission denied to enable service [artifactregistry.googleapis.com]

所有者已授予我 Cloud Functions Admin、Firebase Admin 和 Service Account User 角色,根据 Firebase 支持代表的说法,这已经足够了。

我试过登录/注销,通过npm install -g firebase-tools重新安装 Firebase 命令行工具,重新运行firebase init。 但我仍然收到同样的错误。

有没有人对这个特定错误有任何经验?

【问题讨论】:

    标签: firebase google-cloud-functions firebase-cli


    【解决方案1】:

    我找到了解决方案,现在可以部署了。这是对我有用的答案。

    正如我在问题中提到的,启用 Cloud Functions Admin、Firebase Admin 和 Service Account User 角色并没有解决问题。所以我要求所有者给我 API Keys Admin 角色。

    另外,我注意到 https://console.cloud.google.com/marketplace/product/google/artifactregistry.googleapis.com 没有启用 Artefact Registry API

    由于错误是Permission denied to enable service [artifactregistry.googleapis.com],所以我要求所有者手动启用它。

    做这两件事解决了问题,我现在可以部署云函数了。

    【讨论】:

      【解决方案2】:

      我有同样的问题。

      我有 2 美元的待付款,我付款并解决了问题。我能够更新我的功能并部署我的功能

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-03-22
        • 1970-01-01
        • 2014-01-03
        • 1970-01-01
        • 1970-01-01
        • 2019-02-25
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多