Gcloud Auth Activate Service Account
gcloud auth activate-service-account my-sa@project-123.iam.gserviceaccount.com --key-file=/path/to/keyfile.p12 --password=notasecret
The command gcloud auth activate-service-account is primarily used to authorize the Google Cloud CLI (gcloud) for , such as CI/CD pipelines, automation scripts, or remote servers. It allows an application to act as its own identity rather than using a personal user account. 🛠️ Core Usage gcloud auth activate service account
Note: Activating a service account stores a copy of the credentials locally in ~/.config/gcloud , so ensure your environment is cleaned up after use. gcloud auth activate-service-account my-sa@project-123
# Activate service account gcloud auth activate-service-account jenkins-sa@my-project.iam.gserviceaccount.com --key-file=./credentials.json such as CI/CD pipelines
gcloud compute instances list
The command is activate-service-account (with hyphens), not activate service account .
To activate a service account, you typically use a JSON key file downloaded from the Google Cloud Console :
