The google docs say to export the env var GOOGLE_APPLICATION_CREDENTIALS
with the path to a service account's JSON key, and gcloud will use it. I can't get it to work.
My command is:
GOOGLE_APPLICATION_CREDENTIALS=/home/ubuntu/.config/google-creds.json bq ls
This just brings up an error:
You do not currently have an active account selected. Please run:
$ gcloud auth login
to obtain new credentials, or if you have already logged in with a different account:
$ gcloud config set account ACCOUNT
to select an already authenticated account to use.
gcloud -v
gives:
Google Cloud SDK 92.0.0
bq 2.0.18
bq-nix 2.0.18
core 2016.01.12
core-nix 2015.11.24
gcloud
gsutil 4.16
gsutil-nix 4.15
What am I doing wrong, and how can I fix this? I need gsutil
and bq
to use this file. I'm working with multiple projects so can't activate any one in particular.