【发布时间】:2021-03-07 13:11:09
【问题描述】:
早安,
我是 GCS 新手,正在尝试使用 CLI 访问合作伙伴的存储桶。我已经使用here 提供的文档安装了 gsutil(注意:我使用的是 macOS),现在我正在尝试列出存储桶中的文件。已经提供了访问 ID 密钥和秘密,我使用它们来创建配置文件:
gsutil config -a
哪个输出:
Boto config file "/path/to/.boto" created. If you need to
use a proxy to access the Internet please see the instructions in that
file.
但是,当我使用以下命令列出存储桶中的文件时:
gsutil ls gs://bucket-name
上面写着:
AccessDeniedException: 403 myemail@domain.com does not have storage.objects.list access to the Google Cloud Storage bucket.
我认为这可能是因为我在初始化谷歌云时使用了以下登录:
gcloud init
我想知道是否有办法强制ls 命令使用存储的凭据,而不是我之前所做的电子邮件地址和登录。非常感谢任何帮助。
【问题讨论】:
-
检查您是否以具有文件/存储桶权限的用户身份登录
标签: google-cloud-platform google-cloud-storage gcloud gsutil