GoogleAppsEngine:エラー 401:Unauthorized. Aborting -Must authenticate first.

Published on:
Last updated:

This post is also available in: 日本語 (Japanese)

GoogleAppsEngineにデプロイする際のエラー。Error 401:Unauthorized
Googleアカウントで二段階認証を使っていると、先に認証してくださいと怒られるようです。

An error occurred processing file '': HTTP Error 401: Unauthorized. Aborting. Error 401: --- begin server output --- Must authenticate first.

GoogleAppsEngineにデプロイするアプリケーションフォルダ(myapp)のルートに移動して、以下のコマンドを入力したのち、再デプロイを行います。
OAuth2 token をPC側に保存したくない場合(一時的な利用の場合) --no_cookies オプションを付けます。

appcfg.py --oauth2 update myapp/ --no_cookies

参考引用:
https://cloud.google.com/appengine/docs/python/tools/uploadinganapp#Python_Password-less_login_with_OAuth2

About
Kuniyoshi Takemoto is the founder of Amelt.net LLC, and editor of this blog(www.amelt.net).Learn more and follow me on LinkedIn.