NAME

gcloud beta auth - manage oauth2 credentials for the Google Cloud CLI

SYNOPSIS

gcloud beta auth GROUP | COMMAND [GCLOUD_WIDE_FLAG ...]

DESCRIPTION

(BETA) The gcloud auth command group lets you grant and revoke authorization to Google Cloud CLI (gcloud CLI) to access Google Cloud. Typically, when scripting Google Cloud CLI tools for use on multiple machines, using gcloud auth activate-service-account is recommended.

For information about authorization and credential types, see Authorizing the gcloud CLI https://cloud.google.com/sdk/docs/authorizing. For information about authorizing a service account, see Authorizing with a service account https://cloud.google.com/sdk/docs/authorizing#authorizing_with_a_service_account.

After running gcloud auth commands, you can run other commands with --account=ACCOUNT to authenticate the command with the credentials of the specified account. For information about --account and other gcloud CLI global flags, see the gcloud CLI overview https://cloud.google.com/sdk/gcloud/reference.

EXAMPLES

To authenticate a user account with gcloud and minimal user output, run:

$ gcloud auth login --brief

To list all credentialed accounts and identify the current active account, run:

$ gcloud auth list

To revoke credentials for a user account (like logging out), run:

$ gcloud auth revoke test@gmail.com

GCLOUD WIDE FLAGS

These flags are available to all commands: --help.

Run $ gcloud help for details.

GROUPS

GROUP is one of the following:

application-default

(BETA) Manage your active Application Default Credentials.

COMMANDS

COMMAND is one of the following:

activate-service-account

(BETA) Authorize access to Google Cloud with a service account.

configure-docker

(BETA) Register gcloud as a Docker credential helper.

list

(BETA) Lists credentialed accounts.

login

(BETA) Authorize gcloud to access the Cloud Platform with Google user credentials.

print-access-token

(BETA) Print an access token for the specified account.

print-identity-token

(BETA) Print an identity token for the specified account.

revoke

(BETA) Revoke access credentials for an account.

NOTES

This command is currently in beta and might change without notice. These variants are also available:

$ gcloud auth

$ gcloud alpha auth