【问题标题】:I am getting exception while copying file from a Linux machine to GCS将文件从 Linux 机器复制到 GCS 时出现异常
【发布时间】:2019-01-29 13:29:47
【问题描述】:

当我在 Linux 机器中运行以下命令时出现异常。

我正在尝试将一个文本文件从 linux 机器复制到 Google Cloud Storage 存储桶。

我已经创建了一个服务帐号。

我遵循的步骤-

  1. export GOOGLE_APPLICATION_CREDENTIALS=/home/test/shubham_test/xyz.json 其中,xyz.json 是创建服务帐号时下载的密钥文件。
  2. gsutil cp test.txt gs://my-bucket/

我遇到了以下异常。

ServiceException: 401 Anonymous caller does not have storage.objects.create access to my-bucket/test.txt.

【问题讨论】:

标签: google-cloud-platform


【解决方案1】:

我本来打算建议使用 gcloud auth,但答案已经存在;)

希望这能解决问题:Automating gsutil commands

【讨论】:

    猜你喜欢
    • 2010-09-22
    • 1970-01-01
    • 1970-01-01
    • 2011-10-03
    • 2020-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-26
    相关资源
    最近更新 更多