【问题标题】:Connect google datastore from existing google compute engine in python在 python 中从现有的谷歌计算引擎连接谷歌数据存储
【发布时间】:2016-09-17 12:33:29
【问题描述】:

我正在尝试从现有的计算引擎实例连接到 Datastore,我得到:

[python 2.7 - googledatastore-v1beta2_rev1_2.1.0-py2.7]

googledatastore.connection.RPCError:提交 RPC 客户端失败,HTTP(403) 禁止:未经授权。

Datastore API 已启用,权限已设置,但 GCE 位于不同区域,一个项目

还有什么?

GCE 环境:

DATASTORE_DATASET = project_id
DATASTORE_PRIVATE_KEY_FILE = absolute path to pem file
DATASTORE_SERVICE_ACCOUNT = service_account_email

任何提示我应该做什么/检查?我很困惑,因为我在本地环境中具有完全相同的配置 - 当我在 pyCharm 中单击“播放”时,一切正常;)

也许我错过了什么......

感谢您的帮助;)

【问题讨论】:

    标签: python google-app-engine google-cloud-datastore


    【解决方案1】:

    目前是bug in the Cloud Datastore client library。如果您在 GCE 上运行,它将尝试使用scope rules,然后在尝试其他身份验证方法之前失败。

    【讨论】:

      猜你喜欢
      • 2016-06-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-17
      • 2014-10-30
      • 2011-02-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多