Where Does gcloud Store Config and Credentials?
gcloud ~/.config/gcloud folder with credentials.db, legacy_credentials and per config properties.
Last updated
The gcloud CLI keeps credentials.db, legacy_credentials and named configurations in a gcloud folder under .config in your home folder on every OS.
Application default credentials for app code live in a separate application_default_credentials.json in the same tree. Deleting the folder logs everything out at once.
Where Google Cloud SDK stores this, by platform
%USERPROFILE%\.config\gcloud
Same layout on all OSes. CLOUDSDK_CONFIG relocates it; check the env var when the folder seems missing.
~/.config/gcloud
Configurations subfolder holds one dir per named config with its properties file. Switch with config configurations activate.
~/.config/gcloud
Same layout. Keep permissions owner only; the credentials files grant project access.
Frequently asked questions
How do I wipe all gcloud logins on a shared machine?
Revoke auth logins, then delete the gcloud folder. Both steps matter; files alone leave tokens valid server side.
Where are app default credentials for code?
application_default_credentials.json inside the same gcloud folder, created by the application default login command.
Notice an outdated path? Let us know.