tl;dr
% gcloud auth list
で、正しいアカウントがacitveかどうか見て、正しくなければgcloud init
とかする。
もしくは、ログイン情報ためてるキャッシュファイルを殺せ。
% rm ~/.appcfg_*
以下ログなので読まなくていいです
問題
掲題の通り。以下のようにAppEngineへのデプロイを試みる。
% goapp deploy --application my-oppai-project ./app.yaml 05:24 PM Host: appengine.google.com 05:24 PM Application: my-oppai-project; version: None 05:24 PM Starting update of app: my-oppai-project 05:24 PM Getting current resource limits. 2016-04-24 17:24:16,014 ERROR appcfg.py:2396 An error occurred processing file '': HTTP Error 403: Forbidden Unexpected HTTP status 403. Aborting. Error 403: --- begin server output --- You do not have permission to modify this app (app_id=u's~my-oppai-project'). --- end server output ---
あーはい、どうせ複数アカウントの切り替えしてないんでしょ、って思って
% gcloud auth list Credentialed accounts: - otiai99@gmail.com (active) To set the active account, run: $ gcloud config set account ``ACCOUNT''
OK, 別アカウントでもgcloud init
しよう
% gcloud init # ここでブラウザが開いてOAuthがはじまる # このプロジェクトのオーナーのアカウントでログインする
で、
% gcloud auth list Credentialed accounts: - otiai99@oppai.com (active) - otiai99@gmail.com To set the active account, run: $ gcloud config set account ``ACCOUNT''
みたいになるので、よしオッケーと思ってもっかいやる
% goapp deploy --application my-oppai-project ./app.yaml 05:30 PM Host: appengine.google.com 05:30 PM Application: my-oppai-project; version: None 05:30 PM Starting update of app: my-oppai-project 05:30 PM Getting current resource limits. 2016-04-24 17:30:16,014 ERROR appcfg.py:2396 An error occurred processing file '': HTTP Error 403: Forbidden Unexpected HTTP status 403. Aborting. Error 403: --- begin server output --- You do not have permission to modify this app (app_id=u's~my-oppai-project'). --- end server output ---
_人人人人人人人人人_
> まったく同じエラー <
 ̄^ Y ^ Y ^ Y ^ Y ^ Y ^  ̄
調査
- Uploading, Downloading, and Managing a Go App - Go — Google Cloud Platform
- Issue 212 - googleappengine - 403 Error while attempting to upload app - Google App Engine - Google Project Hosting
- google app engine - Application for gae does not deploy - Stack Overflow
- python - Google App Engine app deployment - Stack Overflow
- Google App Engine にて goapp によるデプロイに失敗する場合の対策 - Qiita
- Google Cloud Platformをローカルから利用するための準備 - Qiita
- [google-appengine] I have problems when trying to deploy my goapp. You do not have permission. - Grokbase
- Google App Engineでハマったよ - MATSU’s vision
- Google グループ
- "Using the command line tools to deploy, I have a ~/.appcfg_cookies file. You might delete that file then try to deploy again."
- まじか
解決
% mv ~/.appcfg_* ~/tmp
雑感
@otiai10 たぶんこの .appcfg_nag と .appcfg_oauth2_tokens、auth listのアカウントごとに別ディレクトリ指定とかできるんだと思うけどおしえてエロいひと
— Hiromu OTIAI (@otiai10) 2016年4月24日
DRYな備忘録