Google Cloud Shell is using project=cloud-devshell-dev instead of my actual project, can't find enabled APIs

后端 未结 1 741
不思量自难忘°
不思量自难忘° 2021-01-19 14:53

I created a GCP project to play around with the video-intelligence API. I enabled the API on my project and launched a Cloud Shell.

I then copied the code from githu

相关标签:
1条回答
  • 2021-01-19 15:51

    Create a service account and have your application use it for API access, run:

      $ gcloud iam service-accounts create my-account
      $ gcloud iam service-accounts keys create key.json
        --iam-account=my-account@my-project.iam.gserviceaccount.com
      $ export GOOGLE_APPLICATION_CREDENTIALS=key.json
    

    In the second command replace my-project with your Project ID.

    0 讨论(0)
提交回复
热议问题