ice account key (long-lived credentials) directly:zenml service-connector register gcp-empty-sa --type gcp --auth-method service-account --service_account_json=@empty-connectors@zenml-core.json  --project_id=zenml-core

Example Command Output

Expanding argument value service_account_json to contents of file /home/stefan/aspyre/src/zenml/empty-connectors@zenml-core.json.

Successfully registered service connector `gcp-empty-sa` with access to the following resources:

┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓

┃     RESOURCE TYPE     │ RESOURCE NAMES                                                                                                            ┃

┠───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┨

┃    🔵 gcp-generic     │ zenml-core                                                                                                                ┃

┠───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┨

┃     📦 gcs-bucket     │ 💥 error: connector authorization failure: failed to list GCS buckets: 403 GET                                            ┃

┃                       │ https://storage.googleapis.com/storage/v1/b?project=zenml-core&projection=noAcl&prettyPrint=false:                        ┃

┃                       │ empty-connectors@zenml-core.iam.gserviceaccount.com does not have storage.buckets.list access to the Google Cloud         ┃

┃                       │ project. Permission 'storage.buckets.list' denied on resource (or it may not exist).                                      ┃

┠───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┨