2016-10-31 23 views
4

我最近將gcloud庫從118.0.0更新到132.0.0,並且立即remote_api_shell不再有效。我經歷了許多重新登錄的排列,通過gcloud設置應用程序默認憑據,並使用服務帳戶和環境變量。所有置換失敗,相同的錯誤消息:Appengine remote_api_shell自更新以來無法使用應用程序默認憑據

Traceback (most recent call last): 
    File "/Users/mbostwick/google-cloud-sdk/bin/remote_api_shell.py", line 133, in <module> 
    run_file(__file__, globals()) 
    File "/Users/mbostwick/google-cloud-sdk/bin/remote_api_shell.py", line 129, in run_file 
    execfile(_PATHS.script_file(script_name), globals_) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/remote_api_shell.py", line 160, in <module> 
    main(sys.argv) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/remote_api_shell.py", line 156, in main 
    oauth2=True) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/remote_api_shell.py", line 74, in remote_api_shell 
    secure=secure, app_id=appid) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 769, in ConfigureRemoteApiForOAuth 
    rpc_server_factory=rpc_server_factory) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 839, in ConfigureRemoteApi 
    app_id = GetRemoteAppIdFromServer(server, path, rtok) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 569, in GetRemoteAppIdFromServer 
    response = server.Send(path, payload=None, **urlargs) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/appengine_rpc_httplib2.py", line 259, in Send 
    NeedAuth() 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/appengine_rpc_httplib2.py", line 235, in NeedAuth 
    RaiseHttpError(url, response_info, response, 'Too many auth attempts.') 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/appengine_rpc_httplib2.py", line 85, in RaiseHttpError 
    raise urllib2.HTTPError(url, response_info.status, msg, response_info, stream) 
urllib2.HTTPError: HTTP Error 401: Unauthorized Too many auth attempts. 

背透131.0.0和130.0.0轉速後,我就回到了118.0.0,在重新登錄,一切工作正常。

更新gcloud後,我沒有更新正在運行的應用程序,因爲我目前正處於發佈週期的中間,所以可能是問題所在,但任何幫助都將不勝感激。謝謝!

+0

您是否曾經與130+合作過?我在133.0.0上看到同樣的問題。 – snakecharmerb

回答

8

TL; DR:這是固定在gcloud版本134

原來的答覆:運行

gcloud auth application-default login --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/userinfo.email 

現在你的遠程shell應該重新工作。

詳細: 我認爲這是由128.0.0更新斷裂,更改到gcloud auth login命令一起。舊的令牌有以下範圍(根據谷歌的tokeninfo端點):

https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/appengine.admin https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/plus.me 

gcloud auth application-default login新的令牌不帶任何選項只有:

https://www.googleapis.com/auth/cloud-platform 

這在gcloud auth application-default login --help

記錄版本134的詳細信息:請求的示波器是:

https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform 

查看https://groups.google.com/d/msg/google-appengine/ptc-76K6Kk4/9qr4601BBgAJ的討論

+0

謝謝,這看起來很有希望。您是否碰巧知道Google是否存在這個問題,無論是關於代碼還是文檔? – snakecharmerb

+0

我不知道是否有。我確實在應用引擎Google羣組上發佈了一些關注。我對公共問題跟蹤器沒有太多信心:https://groups.google.com/forum/#!topic/google-appengine/ptc-76K6Kk4 –

+1

這也是firebase rest API的一個問題,請參閱http://應用程序/問題/ 40443525/firebase-applicationdefaultcredentials-doesnt-work-in-dev-appserver/40539525#40539525 – astromme

相關問題