Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

'gcloud auth login' no longer writes application default credentials #248

Closed
nhammond opened this issue Nov 18, 2016 · 2 comments
Closed

Comments

@nhammond
Copy link
Collaborator

nhammond commented Nov 18, 2016

After running gcloud auth login, I see this warning:

WARNING: gcloud auth login no longer writes application default credentials.
If you need to use ADC, see:
gcloud auth application-default --help

After this, 'loom server create'. The root cause is this command:

>>> oauth2client.client.GoogleCredentials.get_application_default()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nhammond/dev/loom-scratch/env/local/lib/python2.7/site-packages/oauth2client/client.py", line 1288, in get_application_default
    return GoogleCredentials._get_implicit_credentials()
  File "/home/nhammond/dev/loom-scratch/env/local/lib/python2.7/site-packages/oauth2client/client.py", line 1278, in _get_implicit_credentials
    raise ApplicationDefaultCredentialsError(ADC_HELP_MSG)
oauth2client.client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

As a workaround, you can run this:
gcloud auth application-default login

However, this issue will affect all users using a newer version of gcloud who have not already generated credentials. The current prompt asks users to 'gcloud init', but that no longer works.

@nhammond
Copy link
Collaborator Author

nhammond commented Feb 17, 2017

Current behavior is this:

gcloud auth revoke --all
loom server set gcloud --name nate-test
loom server create --settings ~/settings

Traceback (most recent call last):
  File "/Users/s0198839/dev/loom/loom-env/bin/loom", line 11, in <module>
    load_entry_point('loomengine', 'console_scripts', 'loom')()
  File "/Users/s0198839/dev/loom/loom/loomengine/client/main.py", line 72, in main
    return Main().run()
  File "/Users/s0198839/dev/loom/loom/loomengine/client/main.py", line 68, in run
    return self.args.SubcommandClass(self.args).run()
  File "/Users/s0198839/dev/loom/loom/loomengine/client/server.py", line 383, in create
    create_gce_ini(default_plus_user_settings['CUSTOM_SERVICE_ACCOUNT_EMAIL'])
  File "/Users/s0198839/dev/loom/loom/loomengine/client/common.py", line 176, in create_gce_ini
    raise Exception('Credential %s does not exist or is not valid for the current project. Please run "gcloud init" and ensure that the correct project is selected.' % GCE_JSON_PATH)
Exception: Credential ~/.loom/gce_key.json does not exist or is not valid for the current project. Please run "gcloud init" and ensure that the correct project is selected.

gcloud init
# logged in and chose settings

loom server create --settings ~/settings.ini

# Same error as above.

@nhammond
Copy link
Collaborator Author

With planned release 0.3.0, automatic service account key generation feature is removed and this issue is moot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant