【问题标题】:Inserting images in a GCE account在 GCE 帐户中插入图像
【发布时间】:2014-12-10 06:10:30
【问题描述】:

我正在尝试在 gce 帐户中注册/插入图像。此原始图像源是公开共享的。但是,我在进行插入调用时看到了这个错误

{u'status': u'DONE', u'kind': u'compute#operation', u'name': u'operation-1413287109771-505608c24bef9-5c02ac49-1dbd219b', u'startTime': u'2014-10-14T04:45:10.142-07:00', u'httpErrorMessage': u'FORBIDDEN', u'insertTime': u'2014-10-14T04:45:09.871-07:00', u'targetLink': u'https://www.googleapis.com/compute/v1/projects/qubole-gce-test/global/images/image-v1-36', u'operationType': u'insert', u'error': {u'errors': [{u'message': u"Required 'read' permission for 'rawDisk.source'", u'code': u'PERMISSIONS_ERROR'}]}, u'progress': 100, u'endTime': u'2014-10-14T04:45:11.625-07:00', u'httpErrorStatusCode': 403, u'id': u'15732625722022858454', u'selfLink': u'https://www.googleapis.com/compute/v1/projects/qubole-gce-test/global/operations/operation-1413287109771-505608c24bef9-5c02ac49-1dbd219b', u'user': u'964307357192-smkpef2g0v8q3oopq44tvh1d3h1lplgk@developer.gserviceaccount.com'}

我在谷歌上搜索并从我发现的帖子中说,你必须公开分享图片 - 我已经这样做了。

我正在使用这个 API https://cloud.google.com/compute/docs/reference/latest/images/insert

我在这里使用的 rawDisk.source 是我公开的 GCS URL,但我收到了我粘贴的错误。

【问题讨论】:

    标签: google-compute-engine


    【解决方案1】:

    作为 gce-disussion 邮件列表中的discussed,这是工程团队正在研究的 GCE 中的一个已知回归。作为一种解决方法,您可以通过在执行 OAuth2 身份验证时将 GCS 读写范围 (https://www.googleapis.com/auth/devstorage.read_write) 添加到您请求的范围中来使此 API 正常工作。

    【讨论】:

      猜你喜欢
      • 2019-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多