I’m deploying Kubernetes apps to GKE through CircleCI these days, but today it fails with error that follows:
ubuntu@box241:~/myapp$ ./deploy/bin/gcp-auth-staging.sh
[INFO] GCP_CREDENTIALS_STAGING is found. Assuming it is base64-encoded.
ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: '/home/ubuntu/.config/gcloud/configurations/config_default'
If you would like to report this issue, please run the following command:
gcloud feedback
ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: '/home/ubuntu/.config/gcloud/configurations/config_default'
If you would like to report this issue, please run the following command:
gcloud feedback
ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: '/home/ubuntu/.config/gcloud/configurations/config_default'
If you would like to report this issue, please run the following command:
gcloud feedback
ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: '/home/ubuntu/.config/gcloud/configurations/config_default'
If you would like to report this issue, please run the following command:
gcloud feedback
ERROR: (gclusters.get-credentials) 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 auth activate-service-account caused this. I tried changing the ownership of /home/ubuntu/.config/gcloud/configurations/config_default from root:root to ubuntu:ubuntu and it works.
I am then able to pass the authentication but discouraged to continue the deploy.
I have been successfully deploying by following the workround proposed here:
It passed two weeks last time I have deployed the app. Something has changed since then?
I am running the script in deployment phase since I need to change an account to use regarding which branch is being deployed, by running respective scripts like gcp-auth-staging.sh or gcp-auth-production.sh).
Sudo-ing gcloud in deployment phase seems to work.