google-app-engineoauthmultiple-accounts

Issuing "appcfg.py --oauth update ." with multiple accounts?


I configured OAuth for one account I have, my.first.email@gmail.com. It works perfectly with Appengine app_ids I'm using for that account.

Once I try to use it on an application 'foo' for another account (say my.second.email@gmail.com), though, the system gives me an error (quite expectedly):

$ appcfg.py --oauth2 update .
10:09 AM Host: appengine.google.com
10:09 AM Application: foo; version: 100
10:09 AM Starting update of app: foo, version: 100
10:09 AM Getting current resource limits.
10:09 AM Scanning files on local disk.
Error 404: --- begin server output ---
This application does not exist (app_id=u'foo').

Is it possible to use OAuth for TWO (or more) accounts with App Engine? I'd like to be able to use OAuth at the same time for both accounts, maybe changing the CLI command with two different tokens.

Thanks, Riccardo


Solution

  • Use the gcloud command to change between multiple accounts.

    Adding a new account:

    gcloud auth login
    

    complete the login process

    Setting above account as default(or simply switching accounts):

     gcloud config set account username@gmail.com