gcloud auth application-default login

From wikieduonline
Jump to navigation Jump to search

gcloud auth application-default login
Your browser has been opened to visit:


Credentials saved to file: [/Users/user/.config/gcloud/application_default_credentials.json]

These credentials will be used by any library that requests Application Default Credentials (ADC).
Cannot find a quota project to add to ADC. You might receive a "quota exceeded" or "API not enabled" error. Run $ gcloud auth application-default set-quota-project to add a quota project.

gcloud auth application-default login
The environment variable [GOOGLE_APPLICATION_CREDENTIALS] is set to:
Credentials will still be generated to the default location:
To use these credentials, unset this environment variable before
running your application.

Do you want to continue (Y/n)?
│ Error: Attempted to load application default credentials since neither `credentials` nor `access_token` was set in the provider block.  No credentials loaded. To use your gcloud credentials, run 'gcloud auth application-default login'
│   with provider["registry.terraform.io/hashicorp/google"],
│   on vpc.tf line 12, in provider "google":
│   12: provider "google" {
│ google: could not find default credentials. See https://cloud.google.com/docs/authentication/external/set-up-adc for more information


 curl \
 -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
 -H "Content-Type: application/json; charset=utf-8" \

See also