I am trying the following firebase deploy
command and I get the following error:
Error: Authorization failed. This account is missing the fol
in my case I was getting the following:
> firebase deploy
Error: Authorization failed. This account is missing the following required permissions on project deploy:
firebase.projects.get
firebasehosting.sites.update
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! n00001@0.0.0 deploy: `firebase deploy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the n00001@0.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/beeeep/.npm/_logs/2099-98-95T09_97_94_392Z-debug.log
Looks like this was the reason: I had deployed it once, then removed the .firebaserc
file before pushing it to github. Then tried again to deploy.
Resolved it by doing a firebase use --add
and selecting the desired firebase project. Which created the .firebaserc
file again. Guess the error message is misleading here.
I was also facing same issue but I logged out and then logeed in again its working fine now
to logout in command line firebase logout
to login again type firebase login
This happened to me several times, but it was always because I was either
For me, this was due to having multiple sites. I changed the project name rather than the site name and therefor didn't have permissions.
Your .firebaserc
file points to the "project" within Firebase.
{
"projects": {
"default": "my-project"
}
}
While the firebase.json
file points to the "site" within Firebase.
{
"hosting": {
"site": "my-site"
}
}
If you created your project in the fireabse website account, during firebase deployment we need to select that firebase project for hosting. Also if you created more than one project in the firebase account, we need to select one project for the deployment process. For that you need to run the below command.
firebase use --add
It will list multiple project and you can choose one from that option. Then run firebase deploy.
Follow the next steps :
firebase projects:list
Result :
┌──────┬───────────────────────┬─────────────┐
│ Name │ Project ID / Instance │ Permissions │
├──────┼───────────────────────┼─────────────┤
│ itest │ chrome-epigram-510 │ O │
└──────┴───────────────────────┴─────────────┘
Use command :
firebase use chrome-epigram-510
Result : Now using project chrome-epigram-510
Use command
firebase deploy
Result
=== Deploying to 'chrome-epigram-510'...
i deploying hosting
i hosting[chrome-epigram-510]: beginning deploy...
i hosting[chrome-epigram-510]: found 9 files in dist/icrm
+ hosting[chrome-epigram-510]: file upload complete
i hosting[chrome-epigram-510]: finalizing version...
+ hosting[chrome-epigram-510]: version finalized
i hosting[chrome-epigram-510]: releasing new version...
+ hosting[chrome-epigram-510]: release complete
+ Deploy complete!
Hosting URL: https://chrome-epigram-510.firebaseapp.com