简体   繁体   中英

Can´t deploy to firebase cloud function

When I try to run an firebase deploy --only functions I get this error for ALMOST every function:

"WARNING: Failed to delete temporary cache image to stable name; this will not affect current build: DELETE https:// ** ** * /gcf-artifacts/application--on_application_write/cache/manifests/4500b6e2-9253-4d70-8c91-5ba800c62978: DENIED: Permission "artifactregistry.repositories.deleteArtifacts" denied on resource "projects/ * _ _/repositories/gcf-artifacts" (or it may not exist)""

Can someone tell me what to do? Which account does not have the permission? Is it my admin-sdk service account?

You will need to grant your account the "artifactregistry.repositories.deleteArtifacts" permission on the "gcf-artifacts" repository. This can typically be done using the Cloud Console or the gcloud command-line tool. For example, you can use the following gcloud command to grant the necessary permissions to the service account associated with your Firebase project:

gcloud projects add-iam-policy-binding <PROJECT_ID> \
    --member serviceAccount:<SERVICE_ACCOUNT> \
    --role roles/artifactregistry.repositorie.deleteArtifacts

Replace <PROJECT_ID> with the ID of your Firebase project, and <SERVICE_ACCOUNT> with the email address of the service account that you are using to deploy your functions.

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