Search code examples
firebase-hosting

Cannot deploy to firebase hosting due to 403 error


I have already deployed this project in the past, but now I have limited permissions but I still get permission errors when deploying to firebase even if I already have the firebase hosting admin permission.

Here is the error that I keep on receiving when I run firebase deploy --only hosting from the root folder of my app.

=== Deploying to '{firebase-project-name}'...

i  deploying hosting

Error: HTTP Error: 403, Permission 'firebasehosting.sites.update' denied on resource 'projects/-/sites/{firebase-project-name}' (or it may not exist)

I also have the following permissions already assigned to my account

  • Cloud Functions Admin
  • Firebase Hosting Admin
  • Firebase Viewer
  • Logs Configuration Writer
  • Secret Manager Secret Accessor
  • Service Account User
  • Viewer

I have tried re-authenticating my account, but still the same issue.


Solution

  • I have now resolved this. So the problem was with the permissions I followed this post and asked for the 3 permissions mentioned in the post which are:

    1. Cloud Build Service Account
    2. Firebase Admin
    3. API Keys Admin