googlearchive / k8s-service-catalog

[DEPRECATED] Commandline tool to manage Service Catalog lifecycle and GCP Service Broker atop Kubernetes Cluster
Apache License 2.0
69 stars 31 forks source link

invalid_grant error #194

Closed ukd1 closed 6 years ago

ukd1 commented 6 years ago

During install, I get the following error - but have no way to know what it means or what to do:

russ$ sc version
sc version 0.1.1 darwin/amd64
russ$ sc install
account: xxxx
project: yyyy
zone: us-west1
generated service catalog deployment config in dir: /tmp/service-catalog818696252 
Service Catalog installed successfully.
russ$
russ$
russ$
russ$ sc add-gcp-broker
using project:  yyyy
enabled required APIs:
  servicebroker.googleapis.com
  bigquery-json.googleapis.com
  bigtableadmin.googleapis.com
  ml.googleapis.com
  pubsub.googleapis.com
  spanner.googleapis.com
  sqladmin.googleapis.com
  storage-api.googleapis.com
generated the key at:  /tmp/service-catalog-gcp945636597/key.json
Failed to configure the Service Broker
Error: error retrieving or creating default broker: error executing request: &{POST https://servicebroker.googleapis.com/v1beta1/projects/yyyy/brokers HTTP/1.1 1 1 map[] {0xc42020aa80} 0x12bb660 85 [] false servicebroker.googleapis.com map[] map[] <nil> map[]   <nil> <nil> <nil> <nil>}; error: Post https://servicebroker.googleapis.com/v1beta1/projects/yyyy/brokers: oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error" : "invalid_grant",
  "error_description" : "Bad Request"
}
kibbles-n-bytes commented 6 years ago

Looks to be a gcloud auth problem. Could you run the following, and then retry sc add-gcp-broker?

gcloud components install beta
gcloud auth login
gcloud auth application-default login
martinmaly commented 6 years ago

Has the issue been resolved using instructions that kibbles-n-bytes provided? If so, may this issue be resolved?

kibbles-n-bytes commented 6 years ago

I'm assuming the heart emoji means my solution worked. :smile: I'm going to close this, if it's still an issue then feel free to reopen.