• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

GCP Activate Service Account

December 10, 2021

How to activate a GCP service account for other users in Linux.

First generate a key for the service account. Save as key.json.

Login to the server as that user and copy the key there. Activate the service account.

$ gcloud auth activate-service-account [ACCOUNT] --key-file=key.json

$ gcloud auth activate-service-account [ACCOUNT] --key-file=key.json

Once authenticated, you should be able to check if service account is active.

$ gcloud config list

$ gcloud config list

A better option without needing a key.

gcloud config set core/account service-account@project-id.iam.gserviceaccount.com

gcloud config set core/account service-account@project-id.iam.gserviceaccount.com

Filed Under: Cloud Tagged With: activate, gcp, json, key, service account

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023