2016-12-07 37 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

回答