Gcloud Login With Service Account ^hot^
The real happy ending for the story wasn't logging in locally; it was erasing the need to log in at all.
You must have the Service Account Token Creator ( roles/iam.serviceAccountTokenCreator ) role on the target service account. Command-level Impersonation: gcloud login with service account
RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' # No Color The real happy ending for the story wasn't
Select as the format and click Create . This downloads a private key file to your machine. Protect this file carefully , as anyone with it can act as the service account. 2. Log in Using the Key File gcloud login with service account