Reputation: 1616
I have several gcloud service accounts and I'd like to add them to gcloud config configurations list
. From what I could find on their doc, I could create different configurations using command gcloud config configurations create <config-name>
. Then I did following to add a service account to my configuration list
gcloud config configurations activate <config-name>
gcloud config set account <service-account-email>
gcloud config configurations activate default
Seems like everything is fine. But when I try to deploy something it reports error
gcloud app deploy <some>.yaml --configurations <config-name>
ERROR: (gcloud.app.deploy) Your current active account [<service-account-email>] does not have any valid credentials
I have the credential file on hand but have no idea how to apply it. Any help would be appreciated.
Upvotes: 2
Views: 1550
Reputation: 81346
You forgot to active your service account credentials:
gcloud auth activate-service-account [email protected] --key-file=service_account.json
Upvotes: 4