Description of the bug:
CLI Version:
0.11.3
Operating System:
Windows
Objective:
Authenticate Gemini CLI with Google Cloud Vertex AI using a service account.
Symptoms:
- The
gemini -d "Hello" command consistently fails to authenticate via Vertex AI.
- The debug output does not contain the expected
Authenticated via 'vertex-ai' message.
- The debug output always contains the message
Loaded cached credentials., even when all known credential caches are disabled.
Troubleshooting Steps Performed:
We have exhaustively checked and verified the following configurations and steps:
- Environment Variables: All required variables are correctly set:
GOOGLE_GENAI_USE_VERTEXAI=true
GOOGLE_CLOUD_PROJECT
GOOGLE_CLOUD_LOCATION
GOOGLE_APPLICATION_CREDENTIALS
- Credentials File:
- The path points to a valid service account JSON key.
- Tested with a direct, physical file path (e.g.,
C:\keys\key.json) to rule out symbolic link issues.
- Generated a new service account key and tested with it.
- GCP Project Settings:
- Vertex AI API is enabled.
- A billing account is linked to the project.
- The service account has the "Vertex AI User" role.
- Credential Cache:
- The standard ADC cache file (
%APPDATA%\google-auth\hs_credentials.json) does not exist.
- The
gcloud config directory (%APPDATA%\gcloud) was temporarily renamed to disable it, but this had no effect on the outcome.
Conclusion:
Despite all correct configurations, the Gemini CLI appears to be incorrectly prioritizing an unknown cached credential source and ignoring the GOOGLE_APPLICATION_CREDENTIALS environment variable. This is likely a bug in the credential loading priority chain within the CLI on Windows.
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response
Description of the bug:
CLI Version:
0.11.3Operating System:
Windows
Objective:
Authenticate Gemini CLI with Google Cloud Vertex AI using a service account.
Symptoms:
gemini -d "Hello"command consistently fails to authenticate via Vertex AI.Authenticated via 'vertex-ai'message.Loaded cached credentials., even when all known credential caches are disabled.Troubleshooting Steps Performed:
We have exhaustively checked and verified the following configurations and steps:
GOOGLE_GENAI_USE_VERTEXAI=trueGOOGLE_CLOUD_PROJECTGOOGLE_CLOUD_LOCATIONGOOGLE_APPLICATION_CREDENTIALSC:\keys\key.json) to rule out symbolic link issues.%APPDATA%\google-auth\hs_credentials.json) does not exist.gcloudconfig directory (%APPDATA%\gcloud) was temporarily renamed to disable it, but this had no effect on the outcome.Conclusion:
Despite all correct configurations, the Gemini CLI appears to be incorrectly prioritizing an unknown cached credential source and ignoring the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable. This is likely a bug in the credential loading priority chain within the CLI on Windows.Actual vs expected behavior:
No response
Any other information you'd like to share?
No response