我尝试按照 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/