4

Where are the google cloud credentials stored in linux. I tried searching in the home folder but couldn't find anything relevant. For aws for example they are stored in ~/.aws

2 Answers 2

8

Your credentials are stored at ~/.config/gcloud.

Credentials are stored in two files: access_tokens.db and credentials.db in that directory. Both files are an SQLite database.

I wrote this article (and several more) about where your credentials are stored. This article is primarily for Windows but Linux is similar.

The key is once you locate your credentials, you need to know how to decode them, which my article explains in detail. The answer is too long to fit into a Stackoverflow answer, so I am providing a link.

Google Cloud – Where are my credentials stored

2
  • 2
    Thanks for your answer, @JohnHanley. To see the contents of these databases, one doesn't need a python script: sqlite3 ~/.config/gcloud/credentials.db .dump does the job just fine. Commented Oct 21, 2020 at 2:35
  • @PeterV.Mørch - yes, of course, unless you actually need to do that in a program or you want to understand the low-level details. Commented Oct 21, 2020 at 2:42
0

Credentials are often listed on the right side of the page when you pull up deployment manager or have the CLI command on how to obtain them. Not always.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .