gcloud_beta_auth_application-default (1)
NAME
- gcloud beta auth application-default - manage your active Application Default Credentials
SYNOPSIS
-
gcloud beta auth application-default COMMAND [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(BETA) Application Default Credentials (ADC) provide a method to get
These credentials are only used by Google client libraries in your own application.
More information on ADC and how they work can be found here: developers.google.com/identity/protocols/application-default-credentials
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
COMMANDS
COMMAND is one of the following:
-
- login
-
(BETA) Acquire new user credentials to use for Application Default
Credentials.
- print-access-token
-
(BETA) Print an access token for your current Application Default
Credentials.
- revoke
-
(BETA) Revoke previously generated Application Default Credentials.
EXAMPLES
To create a service account and have your application use it for API access, run:
-
$ gcloud iam service-accounts create my-account
$ gcloud iam service-accounts keys create key.json
--iam-account=my-account@my-project.iam.gserviceaccount.com $ export GOOGLE_APPLICATION_CREDENTIALS=key.json $ ./my_application.sh
To temporarily use your own user credentials, run:
- $ gcloud beta auth application-default login
This will take you through a web flow to acquire new user credentials.
NOTES
This command is currently in BETA and may change without notice. This variant is also available:
- $ gcloud auth application-default