![](/img/trans.png)
[英]Firebase CLI how to change project scope?firebase init(error:403, The caller does not have permission) uses project url of another account
[英]Firebase init functions returns 403 caller does not have permission
我正在尝试在现有项目中以 Firebase 管理员(不是所有者)身份执行“firebase init 函数”,但收到以下 403 错误:
➜ website git:(master) ✗ firebase init functions
######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########
You're about to initialize a Firebase project in this directory:
/Users/cliff/Work/map/website
Before we get started, keep in mind:
* You are initializing in an existing Firebase project directory
=== Project Setup
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.
i .firebaserc already has a default project, using my-web-project.
=== Functions Setup
A functions directory will be created in your project with a Node.js
package pre-configured. Functions can be deployed with firebase deploy.
Error: HTTP Error: 403, The caller does not have permission
Having trouble? Try firebase [command] --help
➜ website git:(master) ✗
有什么建议么?
显然,如果您不是 Firebase 所有者,那么您需要拥有所有者添加的额外权限,如下所示:
错误:缺少部署函数所需的权限。 您必须对服务帐户 my-web-project@appspot.gserviceaccount.com 具有 iam.serviceAccounts.ActAs 权限。
要解决此错误,请项目所有者为您的帐户分配此 URL 中的“服务帐户用户”角色:
https://console.cloud.google.com/iam-admin/iam?project=my-web-project
希望这对将来的人有帮助。
output 告诉您 CLI 在当前目录或其父目录之一中使用 .firebaserc 文件找到了一个名为“my-web-project”的现有项目。 该错误告诉您您登录的 Google 用户帐户无权使用该项目。
目前尚不清楚您运行此命令的意图是什么,但您必须:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.