gcp,

GCP: revoking gcloud auth

Mar 14, 2023 · 1 min read · Post a comment

In this tutorial, I’m going to show you how easy is to revoke any gcloud authentication, whatever you are dealing with multiple GCP personal or even service accounts.

Prerequisites

  • GCP account
  • gcloud CLI

Solution

Step 1. List all accounts:

gcloud auth list

Step 2. To revoke a particular account, run:

gcloud auth revoke [ACCOUNT]

Note(s):

  • If you want to sign out of every active account, run the following command instead: gcloud auth revoke --all.
  • Sometimes it might be required to unset the env variable. For instance: unset GOOGLE_APPLICATION_CREDENTIALS.

Conclusion

If you get stuck at some step, feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.