PERMISSION_DENIED Spring Cloud GCP

时间:2020-10-07 22:49:45

标签: google-cloud-vision spring-cloud-gcp

我对Spring Cloud GCP有问题,因为在使用OCR类型TEXT_DETECTION的第一次运行中,它运行正常,没有任何问题,但是如果我再次尝试使用文本识别过程,则会收到以下权限被拒绝的错误,我必须重新启动应用程序才能使用新过程,值得一提的是,我正在属性文件中使用此设置

    spring.cloud.gcp.credentials.location=classpath:filepermision.json
spring.cloud.gcp.project-id=uipaocr
spring.cloud.gcp.vision.enabled=true
spring.cloud.gcp.core.enabled=true


  There was an unexpected error (type=Internal Server Error, status=500).
    io.grpc.StatusRuntimeException: PERMISSION_DENIED: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the vision.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.
    com.google.api.gax.rpc.PermissionDeniedException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the vision.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.

0 个答案:

没有答案