App Engine, appcfg and saving uploading credential

2019-02-22 14:25发布

On Linux, it seems that appcfg.py saves credentials when I use it to upload a new version of my application. However, this doesn't seem to happen OSX, and the password is asked every time.

On Linux, I have local installation. On OSX, I have used binary installer.

Is it possible to do something for OSX, so that it would save me the effort of retyping password all the time?

More info: Found zero sited .appcfg_cookies in my home folder. Obviously it is not saving credentials there, though trying.

4条回答
老娘就宠你
2楼-- · 2019-02-22 14:29

After

1) Updating Google Appengine to version 1.4.2 via launcher (I might have hit 1.4.x bug?)

2) Deleting cookie file

it looks like cookie file started working again.

It should have content like:

# Netscape HTTP Cookie File
    # http://www.netscape.com/newsref/std/cookie_spec.html
    # This is a generated file!  Do not edit.

appengine.google.com    FALSE....
查看更多
时光不老,我们不散
3楼-- · 2019-02-22 14:31

You can use the OAuth 2.0 feature of appcfg to avoid the need to enter your login and password. It is documented for Java, Python and Go.

Instead of using your login and password to authenticate you, you will proceed once through an OAuth 2.0 grant flow in your web browser. The results of that grant will be cached for future pushes.

To use this feature, just add one option to your appcfg command: --oauth2. For Java, it looks like this:

$  appcfg.sh --oauth2 update ./web
查看更多
Explosion°爆炸
4楼-- · 2019-02-22 14:31

Download the launcher for OSX, it allows to store the credentials in the OS Keychain.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-02-22 14:33

Check out the Python module keyring - http://bitbucket.org/kang/python-keyring-lib

Supports Linux (Gnome,KDE), Win32 and OSX keychain backends. Worked great for me.

查看更多
登录 后发表回答