Failed to authenticate, have you run firebase login?
I cross reference this stackoverflow question also since it is not resolved yet.
firebase-tools:
Platform:
[REQUIRED] Test case
I am following instructions for Firebase functions. I have successful login from my console, however when I am trying to deploy functions, terminal gives an error: enter image description here
oleg@oleg-HP-EliteBook-8460p:~/Desktop/Oleg/projects/firebase-functions$ firebase login
Already logged in as [my user email]
oleg@oleg-HP-EliteBook-8460p:~/Desktop/Oleg/projects/firebase-functions$ sudo firebase deploy --only functions
Error: Failed to authenticate, have you run firebase login? (node:11224) MetadataLookupWarning: received unexpected error = Unsuccessful response status code. Request failed with status code 403 code = 403 Having trouble? Try firebase [command] --help
So the error is kind of controversial. Firstly, Firebase says that I am already successfully logged in. Right next, Firebase says that I am not logged in... I suspect there should be some setting for user name or something like that in kind of local firebase.json file or other files, but I didn't find it.. Or should I change something in the Firebase Console?
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
[REQUIRED] Actual behavior
This issue does not seem to follow the issue template. Make sure you provide all the required information.
I filed the fields of the template by they disappear for some reason..
@Liker777 the difference is that you're running firebase login and then sudo firebase deploy. You should never need to use sudo with Firebase.
@Liker777 the difference is that you're running
firebase loginand thensudo firebase deploy. You should never need to usesudowith Firebase.
Thanks a lot! Without sudo, it works differently.