I'm using $firebase deploy
to upload my static files to my newly created firebase project, but I get the following error in the command line.
Unable to authorize access to project project-1234567890
The error message goes on to mention the Firebase CLI is only compatible with the new Firebase Console, which is what I'm using.
I've signed in earlier, so I believe I should have access to the project I've created in the console.
Try running this after you go through your firebase init
firebase use --add
From there you can select your instance, for example: your-project-name-instance
I had the same issue, and running that command and selecting the instance allowed me to do the deploy.
I solved my problem with the following steps:
Then I again ran:
firebase init
Then I chose my default project.
Type these commands:
firebase login
Login with your email that content your Firebase project
Choose the name of your project
firebase deploy
You can check firebase-debug.log In my case, the error was "FirebaseError: HTTP Error: 401, Request had invalid authentication credentials."
run the following command:-
firebase login --reauth
then you can use
firebase deploy
When I tried doing a $firebase deploy --debug
my upload seemed to work. I'm not sure if this new command arg fixed the issue, or if I needed to wait a certain amount of time after creating the project before performing the deploy.
Make sure you are logged in into the right account. So use $firebase logout
out and then $firebase login
select the correct account and allow CLI.
Authorization issue requires you to permit the currently logged under "Project Overview --> Users and Permissions". This error means that the logged in user does not belong to any of the permitted roles for firebase database in question. You must go to firebase console and add user to a role under Users and Permissions.
I did yarn build
and add { "projects": { "default": "xxx", "staging": "yyyy" } }
to .firebaserc
not sure which one helped!
I also facing this issue and fixed now .
Finally, I fixed this issue by delete the.config folder then firebase command is working and new .config folder created
C:\Users\DELL\.config
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.