HTTP错误:401,输入的凭据不正确. Firebase云功能 [英] HTTP Error: 401, The entered credentials were incorrect. Firebase Cloud Function

查看:198
本文介绍了HTTP错误:401,输入的凭据不正确. Firebase云功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我在终端(mac os sierra)中使用以下命令时

Whenever I use following command in terminal (mac os sierra)

firebase初始化

将显示以下三个选项

❯◯ Database: Deploy Firebase Realtime Database Rules
 ◯ Functions: Configure and deploy Cloud Functions
 ◯ Hosting: Configure and deploy Firebase Hosting sites

如果我什么也没选择,然后按Enter

If I select nothing and press Enter

我将收到以下消息

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

i  .firebaserc already has a default project, skipping

i  Writing configuration info to firebase.json...
i  Writing project information to .firebaserc...

✔  Firebase initialization complete!

但是当我选择第二个选项时

But when I select second option

◯ Functions: Configure and deploy Cloud Functions

我将收到以下消息

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

i  .firebaserc already has a default project, skipping

=== Functions Setup

A functions directory will be created in your project with a Node.js
package pre-configured. Functions can be deployed with firebase deploy.


Error: HTTP Error: 401, The entered credentials were incorrect.
Amits-MacBook-Pro:firebase-functions Amit$ 

我尝试了 firebase注销,然后再次尝试 firebase登录,但是同样的错误即将到来

I have tried with firebase logout and then firebase login again but same error is coming

我还使用了 firebase列表

我得到警告,然后得到了项目列表

I got below warning and then I got list of project

Amits-MacBook-Pro:firebase-functions Amit $ firebase列表 警告:如果没有ES6/C ++ 11,高级压缩编码将不可用.退回到gzip.

Amits-MacBook-Pro:firebase-functions Amit$ firebase list Warning: advanced compression encodings unavailable without ES6/C++11. Falling back to gzip.

很久以前,我已将Firebase功能与另一个google登录名一起使用,现在我从该帐户注销,并开始使用其他google登录名登录,但无法执行此操作,如果我使用以前的google登录名仍然无法正常工作

Since long time ago I have used firebase function with another google login, now I am logout from that and started to login with different google login account but unable to do it, if I login with previouse google login still it's not working

我还检查了我使用 firebase init 的目录,该目录中没有文件.

I have also check directory where I have used firebase init no files are creating in that directory.

在Firebase功能演示中,他们显示了一些文件已创建

In demo of Firebase function they have shown that some files are created

https://www.youtube.com/watch?v=EvV9Vk9iOCQ& t = 308s

我应该卸载firebase并重新安装吗?如果是,请让我知道如何卸载?

Should I uninstall firebase and install it again? if yes, just let me know how to uninstall?

推荐答案

当我使用错误的Google帐户进行身份验证时,我遇到了相同的Firebase错误:"HTTP错误:401,输入的凭据不正确". 我做了firebase login --reauth并使用正确的帐户登录. 之后,该项目已成功部署.

I had the same Firebase Error: "HTTP Error: 401, The entered credentials were incorrect" when I was authenticated with the wrong Google account. I did firebase login --reauth and logged in with the right account. After that, the project was successfully deployed.

这篇关于HTTP错误:401,输入的凭据不正确. Firebase云功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆