【问题标题】:Authentication to google cloud storage from GSUtil从 GSUtil 对谷歌云存储的身份验证
【发布时间】:2014-07-17 08:54:22
【问题描述】:

直到昨天我还没有遇到 gsutil 工具的任何问题,我有读写权限,但昨天它突然开始说以下每当我尝试运行 gsutil 命令时:

gsutil ls
Your "Oauth 2.0 User Account" credentials are invalid. For
more help, see "gsutil help creds", or re-run the gsutil config
command (see "gsutil help config"). Failure: unauthorized_client.

我正在使用 .google-cloud-sdk 内部的 gsutil:

which gsutil
/Users/jesperrix/.google-cloud-sdk/bin/gsutil

我尝试运行 gsutil config 命令,显示如下:

您似乎正在尝试运行 “/Users/jesperrix/.google-cloud-sdk/bin/bootstrapping/gsutil.py config”。Cloud SDK 不再需要“config”命令。 要进行身份验证,请运行: gcloud auth login 真的运行此命令吗? (是/否)

我尝试运行该命令,但它没有工作,然后我尝试运行云身份验证登录,它也没有工作。当它询问我应用程序 ID 时,我尝试同时使用字符串 id 和旧号码 id。

我尝试进行身份验证的用户是项目的所有者。

我希望你能帮助我。

【问题讨论】:

    标签: authentication google-cloud-storage


    【解决方案1】:

    我通过删除我的主文件夹中用 google 命名的所有内容来纠正问题,然后我再次运行 bash 安装以从头开始安装 sdk:

    curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash
    

    现在它再次按预期工作。我还是不知道出了什么问题!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-08-07
      • 2020-08-25
      • 1970-01-01
      • 1970-01-01
      • 2019-11-01
      • 2014-09-13
      • 2018-10-20
      相关资源
      最近更新 更多