Support Service Account Authentication for Vertex AI Without gcloud CLI #396
-
Currently, it appears that using Vertex AI requires the gcloud CLI. url My current approach (outside of ADK) is to create a Google service account and use the following Python code: credentials = Credentials.from_service_account_file(GOOGLE_APPLICATION_CREDENTIALS)
vertexai.init(project=project, location=location, credentials=credentials) Is it possible to support authentication with a Google service account for Vertex AI, so that the CLI is not required? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You may use the GOOGLE_APPLICATION_CREDENTIALS environment variable. See https://cloud.google.com/docs/authentication/application-default-credentials. Moving this to discussions. |
Beta Was this translation helpful? Give feedback.
You may use the GOOGLE_APPLICATION_CREDENTIALS environment variable. See https://cloud.google.com/docs/authentication/application-default-credentials. Moving this to discussions.