无法加载默认凭据? (Node.js Google Compute Engine教程) [英] Could not load the default credentials? (Node.js Google Compute Engine tutorial)
问题描述
情况:
我遵循本教程: https://cloud.google.com/nodejs/tutorials/bookshelf-on-compute-engine
一切正常,直到我 npm start
并转到:
Everything works fine until I do npm start
and go to:
我在空白处遇到以下文字page:
I am met with the following text on the blank page:
Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
因为我使用的是OAuth,所以没有任何意义。我按照链接阅读了该页面,但我在任何地方都没有 GOOGLE-APPLICATION-CREDENTIALS
字段,在教程中没有任何内容。
Which makes no sense since I am using OAuth. I followed the link and read the page, but I have no GOOGLE-APPLICATION-CREDENTIALS
field anywhere, and nothing about it in the tutorial.
问题:
请您重现这些步骤并告知我,如果你得到相同的结果?
Could you please reproduce the steps and tell me if you get the same result ?
(需要5分钟)
如果没有,我能拥有什么?做错了?
If not, what could I have done wrong ?
推荐答案
是的,我有同样的错误。令人讨厌的是因为谷歌云平台文档的入门书架教程在任何地方都没有提到这一点。这意味着尝试本教程的任何新开发人员都会看到此错误。
Yes, I had the same error. It's annoying cause Google Cloud Platform docs for their "getting started" bookshelf tutorial does not mention this anywhere. Which means that any new developer who tries this tutorial will see this error.
请阅读:
https://developers.google.com/identity/protocols/application-default-credentials
我通过运行修复此问题:
gcloud auth application-default login
I fixed this issue by running:
gcloud auth application-default login
这将使您登录,之后您在本地编码将使用该身份验证。
This will make you login, and after that you code locally will use that authentication.
这篇关于无法加载默认凭据? (Node.js Google Compute Engine教程)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!