LinuxCommandLibrary

gcloud-auth

Grant and revoke authorization to `gcloud` and manage credentials.

TLDR

Authorize Google Cloud access for the gcloud CLI with Google Cloud user credentials and set the current account as active

$ gcloud auth login
copy


Authorize Google Cloud access similar to gcloud auth login but with service account credentials
$ gcloud auth activate-service-account
copy


Manage Application Default Credentials (ADC) for Cloud Client Libraries
$ gcloud auth application-default
copy


Display a list of Google Cloud accounts currently authenticated on your system
$ gcloud auth list
copy


Display the current account's access token
$ gcloud auth print-access-token
copy


Remove access credentials for an account
$ gcloud auth revoke
copy

Copied to clipboard