简体   繁体   中英

Firebase init functions returns 403 caller does not have permission

I'm trying to execute "firebase init functions" as a Firebase admin (not owner) in an existing project but receive the following 403 error:

➜  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) ✗ 

Any suggestions?

Apparently, if you're NOT the Firebase Owner then you need to have an additional permission added by the Owner as follows:

Error: Missing permissions required for functions deploy. You must have permission iam.serviceAccounts.ActAs on service account my-web-project@appspot.gserviceaccount.com.

To address this error, ask a project Owner to assign your account the "Service Account User" role from this URL:

https://console.cloud.google.com/iam-admin/iam?project=my-web-project

Hope this helps someone in the future.

The output is telling you that the CLI has found an existing project called "my-web-project" using a.firebaserc file in the current directory or one of its parent directories. The error is telling you that the Google user account you are logged in as does not have permission to work with that project.

It's not clear what your intent was in running this command, but you will have to either:

  • create a new directory and a new project to work with
  • or grant the current user some sort of access to work with the existing project that the CLI found

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM