Google云端存储凭据

时间:2016-08-18 23:16:14

标签: ruby-on-rails ruby google-cloud-storage gcloud

我遇到了Ruby(Gcloud gem)和Google Cloud存储的问题。 我需要通过API安全地保存谷歌存储上的所有文档(文件)。 我有json文件并按照谷歌教程。

require "gcloud"
storage = Gcloud.storage "my-app-name",
                         "#{Rails.root}/config/8796474039a3.json"

之后我尝试获取所有桶

storage.bucket

得到错误

Caught error forbidden: Forbidden
Error - #<Google::Apis::ClientError: forbidden: Forbidden>

能帮助我的吗? 也许我需要传递别的东西? 谢谢!

0 个答案:

没有答案