直到昨天我还没有遇到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:
中的gsutilwhich gsutil
/Users/jesperrix/.google-cloud-sdk/bin/gsutil
我尝试运行gsutil config命令,其中包含以下内容:
看起来你正试图跑步 " /Users/jesperrix/.google-cloud-sdk/bin/bootstrapping/gsutil.py 配置&#34 ;. " config" Cloud SDK不再需要该命令。 要进行身份验证,请运行:gcloud auth login真的运行此命令吗? (Y / N)
我尝试运行该命令并且它没有工作然后我尝试运行云身份验证登录,它也没有工作。当它询问我申请ID时,我尝试使用字符串ID和旧号码。
我尝试进行身份验证的用户是项目的所有者。
我希望你能帮助我。
答案 0 :(得分:1)
我通过从google中删除名为something的主文件夹中的所有内容来解决问题,然后再次运行bash安装以从头开始安装sdk:
curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash
现在它再次按预定工作。我还是不知道出了什么问题!