firebase - 如何查找我的 Google 应用程序凭据 key.json

标签 firebase google-cloud-functions

我尝试按照 instruction here 在本地运行 Firebase 函数.

它提到了这些步骤:

$ export GOOGLE_APPLICATION_CREDENTIALS="path/to/key.json"

$ firebase experimental:functions:shell

OR

$ firebase serve --only functions

如何找到我的path/to/key.json

最佳答案

您大概按照链接到的页面上的说明进行操作:

To set up admin credentials for emulated functions (other than Cloud Firestore and Realtime Database):

  • Open the Service Accounts pane of the Google Cloud Console.
  • Make sure that App Engine default service account is selected, and use the options menu at right to select Create key.
  • When prompted, select JSON for the key type, and click Create.
  • Set your Google default credentials to point to the downloaded key

只有您知道刚刚从控制台下载的 JSON 文件的路径。将该文件的完整路径放在那里。

关于firebase - 如何查找我的 Google 应用程序凭据 key.json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48492444/

相关文章:

firebase - Firestore 导入是合并还是覆盖集合?

javascript - 错误类型错误 : Cannot read property 'singlePost' of null in angular 5

node.js - 读取和写入 Firestore 的 Firebase 函数会抛出 ReferenceError : query is not defined at cors and Unhandled rejection

firebase - 由于 CORS 限制,无法使用 firebase 进行本地测试

node.js - 调试 firebase 云函数

iOS Firebase CrashlyticsKit 未设置用户 ID

java - fragment 事务出错(空对象引用)

Firebase + 数据存储 = need_index

node.js - response.send 不是函数

firebase - 有没有什么方法可以设置源自多个 firestore 集合的 firestore 触发器以仅触发一个云(javascript)函数?