Automating appcfg.py

618 views
Skip to first unread message

pythono

unread,
Jan 6, 2010, 5:51:31 PM1/6/10
to Google App Engine
Hey there,

I would like to run a shell script that does certain things first and
then updates my app engine application. How could I supply my
password to appcfg.py without manually entering it in? I'm kind of a
novice in shell scripting (i'm using OS X), so the more specific you
can be, the better.

Thanks,
Arjun

dburns

unread,
Jan 9, 2010, 1:34:42 PM1/9/10
to Google App Engine
appcfg.py has this option that should help:

--passin Read the login password from stdin.

stdin means "standard input", which is normally what you type, but you
can redirect stdin like this:

appcfg.py --passin other_parameters_here < password

where password is a file containing nothing but your password.

pythono

unread,
Jan 21, 2010, 3:30:39 PM1/21/10
to Google App Engine
Hey thanks..

Does the password file have to have a particular extension? I saved a
text file containing only my google password, which i called "gpass".
Then I ran the command:
appcfg.py --email=[my email account] --passin < gpass update [my app
folder]

it resulted in:
Server: appengine.google.com.
Scanning files on local disk.
Scanned 500 files.
Initiating update.
Invalid username or password.
Error 401: --- begin server output ---
Must authenticate first.
--- end server output ---
Password for [my email account]

Thanks again,
Arjun

dburns

unread,
Jan 21, 2010, 6:45:36 PM1/21/10
to Google App Engine
Well syntactically, the "< gpass" should always be at the very end
(and no, the name doesn't matter).

I tried it myself just now and ran into some weird EOF (end of file)
error when launching the usual way (i.e. with appcfg.py being the
first command). After some experimentation I discovered that this
somehow breaks the input redirection to python, but if you launch it
by invoking the python executable followed by the script name
(appcfg.py) it works OK. This worked for me:

python "C:\Program Files\Google\google_appengine\appcfg.py" --passin --
email=[email] update [app_folder] < gpass

That's on Windows. Of course adjust the path to where you have
appcfg.py.

Blair Connolly

unread,
Oct 17, 2012, 2:33:24 PM10/17/12
to google-a...@googlegroups.com
Thank yo so much!  That EOF error has been haunting me for days.
Reply all
Reply to author
Forward
0 new messages