2016-12-07 38 views
0

我有一个gcloud用户已通过身份验证,并且从命令行(Windows 8.1)运行gsutils。但是,我需要让我跟着这里的说明,从一个Python应用程序访问gsutils: https://cloud.google.com/storage/docs/xml-api/gspythonlibrary#credentialsGoogle云凭据在尝试安装boto后完全损坏

我得到尽可能创造一个.boto文件,但现在不仅我的Python代码失败(boto.exception.NoAuthHandlerFound :没有处理程序准备好进行身份验证。)。但我无法再从命令行运行bsutils。我得到这个错误:

C:\>gsutil ls 
You are attempting to access protected data with no configured 
credentials. Please visit https://cloud.google.com/console#/project 
and sign up for an account, and then run the "gcloud auth login" 
command to configure gsutil to use these credentials. 

我已经执行gcloud身份验证,它似乎工作,我可以查询我的用户:

C:\>gcloud auth list 
Credentialed Accounts: 
- [email protected] ACTIVE 
- [email protected] 
To set the active account, run: 
    $ gcloud config set account `ACCOUNT` 

我已经与我的电子邮件主动关联的帐户都尝试,和新的serveruser帐户(按照上面的说明创建)。相同的“受保护的数据没有配置的凭据。”错误。我尝试删除.boto文件,并将秘密的CLIENT_ID和CLIENT_SECRET添加到我的.boto文件中。

任何人有任何想法可能是什么问题?

+0

因此,我可以通过调用“gcloud auth revoke”和“gcloud auth login”,再次获得命令行gsutil的工作。但python应用程序仍然非常破碎:“boto.exception.NoAuthHandlerFound:没有处理程序准备好进行身份验证。”错误。是否有最新的指示让GS python绑定工作? https://cloud.google.com/storage/docs/xml-api/gspythonlibrary#credentials中的问题已经过时。 – griffin2000

回答