Skip to content

Instantly share code, notes, and snippets.

@kyouheicf
Created August 24, 2023 03:17
Show Gist options
  • Select an option

  • Save kyouheicf/9e2c5528c60e58786c0edc5f4f6014a5 to your computer and use it in GitHub Desktop.

Select an option

Save kyouheicf/9e2c5528c60e58786c0edc5f4f6014a5 to your computer and use it in GitHub Desktop.
# Get the current CLI user
# https://stackoverflow.com/questions/35311686/how-to-get-the-active-authenticated-gcloud-account
gcloud config list account --format "value(core.account)"
# Login through the browser
gcloud auth login
# Use Credential from json file
gcloud auth activate-service-account \
--key-file=/Users/xxx/key.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment