Firebase部署-“无法授权”错误 [英] Firebase Deploy - "Unable to Authorize" error

查看:70
本文介绍了Firebase部署-“无法授权”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试为已设置的Firebase项目部署一个非常简单的网站,并执行以下步骤:

I tried to deploy a very simple site for a Firebase project I have set up, and followed the following steps:


  1. firebase登录(由于我正在从事其他项目,因此我已经登录了)

  2. firebase初始化(创建了 .firebaserc database.rules。 json 文件)。

  3. firebase部署

  1. firebase login (I was already logged in since I have other projects I'm working on)
  2. firebase init (created the .firebaserc and database.rules.json files).
  3. firebase deploy

在部署时,我不断以下错误消息:

On deploy, I keep getting the following error message:


λfirebase deploy

λ firebase deploy

!您的CLI身份验证需要更新,以利用
的新功能。

! Your CLI authentication needs to be updated to take advantage of new features.

!请运行firebase登录--reauth

! Please run firebase login --reauth

错误:无法授权对项目[项目名称]的访问

Error: Unable to authorize access to project [PROJECT NAME]

我成功地运行了 firebase登录--reauth ,但我仍然得到了这个。

I succesfully ran firebase login --reauth and I still get this.

任何人都知道我可以做什么

Anyone know what I could be doing wrong here?

推荐答案

第一个警告表明您必须更新firebase-cli。

First warning shows you have to update firebase-cli.

运行此命令以更新:

npm install -g firebase-tools

您的项目可能尚未链接,从而导致该错误。

Your project may not have been linked which causes that error.

运行此命令链接项目:

firebase use --add

它将在您的Firebase帐户中列出项目,选择正确的项目,然后尝试使用以下方式部署项目:

It will list down the projects in your firebase account, select the correct one and try deploying the project using:

firebase deploy

PS:您不必附加project_id到 deploy 命令前夕在您运行使用--add 命令

PS: You don't have to append project_id to deploy command every time once you run use --add command

这篇关于Firebase部署-“无法授权”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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