ただでさえ時間がかかるアップロードやremote apiを使うたびにパスワードを聞かれるのがうんざり。
ところでLinux向けのAppEngine SDKはPythonで書かれている。そう、挙動が気に入らないならソースを書き換えればいいじゃない。
1. Googleアカウント情報を保存するファイルを用意
[~]$ touch google_account.txt
[~]$ chmod 600 google_account.txt
[~]$ cat >> google_account.txt
mailaddress password^D
[~]$
2. ソース書き換え
google_appengine/google/appengine/tools/remote_api_shell.py
auth_func関数を書き換える
def auth_func():
return open(os.path.expanduser('~/google_account.txt')).read().split()
return (raw_input('Email: '), getpass.getpass('Password: '))
google_appengine/google/appengine/tools/appcfg.py
def GetUserCredentials():
return open(os.path.expanduser('~/google_account.txt')).read().split()
"""Prompts the user for a username and password."""
email = self.options.email
if email is None:
これでプロンプトなしでアップロードとかできる