【发布时间】:2017-08-12 01:35:23
【问题描述】:
我正在尝试使用以下代码访问 Google Cloud 存储:
client = storage.Client(credentials = GoogleCredentials.from_stream(<path-to-service-account-json>))
抛出此错误:
ValueError: This library only supports credentials from google-auth-library-python. See https://google-cloud-python.readthedocs.io/en/latest/google-cloud-auth.html for help on authentication with this library.
我能够使用相同的凭据(使用 GoogleCredentials.from_stream() 获得)对 discovery.build 服务进行身份验证,但由于某种原因 storage.Client 无法使用提供的凭据。
如果我遗漏了什么,请告诉我。
【问题讨论】:
标签: google-cloud-platform google-cloud-storage