You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
run-gemini-cli does not inherit authentication from google-github-actions/auth #455
When using google-github-actions/auth@v3 with credentials_json before run-gemini-cli@v0, the action does not inherit the authentication and emits the following warning:
No authentication method provided. Please provide one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'.
Even though the GOOGLE_APPLICATION_CREDENTIALS environment variable is correctly set by the auth action, run-gemini-cli does not recognize it and requires explicit authentication parameters.
Expected Behavior
The action should recognize authentication established by google-github-actions/auth@v3, similar to how other Google GitHub Actions work (e.g., google-github-actions/deploy-cloudrun).
Observed Behavior
The action emits "No authentication method provided" warning
Gemini CLI fails to authenticate with Vertex AI
The gh CLI commands within Gemini sandbox also fail to authenticate (even with GH_TOKEN env var and sandbox: false)
Workflow Configuration
- name: Authenticate to Google Clouduses: google-github-actions/auth@v3with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_POC }}create_credentials_file: true
- name: Automatic PR Review with Geminiuses: google-github-actions/run-gemini-cli@v0with:
use_vertex_ai: truegcp_project_id: 'my-project'gcp_location: 'global'gemini_debug: truesettings: | { "model": "gemini-3-pro-preview", "sandbox": false }prompt: | Review this PR...env:
GH_TOKEN: ${{ secrets.GH_PAT }}
I also encounter that the gemini agent keeps on reporting something like:
I am unable to proceed because the gh command requires authentication, which I cannot provide. Please ensure the GitHub CLI is authenticated before attempting to list or apply labels.
However, I have set the GH_TOKEN and GITHUB_TOKEN as envs. I also tried to ask agent to look for the GH_TOKEN env, while it cannot find the env. Seems that the GH_TOKEN env is unavailable when the agent runs. Is there any countermeasure to mitigate this issue?
Related: we hit a similar auth issue with WIF and found that the action defaults to Code Assist auth (cloudcode-pa.googleapis.com) even when use_vertex_ai is set, unless you also explicitly set use_gemini_code_assist: "false".
For WIF/service account auth targeting Vertex AI, the working config is:
Activity
gemini-cli commentedon Feb 3, 2026
🤖 Hi @aoogane, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.
brant-ruan commentedon Mar 2, 2026
I also encounter that the gemini agent keeps on reporting something like:
However, I have set the GH_TOKEN and GITHUB_TOKEN as envs. I also tried to ask agent to look for the GH_TOKEN env, while it cannot find the env. Seems that the GH_TOKEN env is unavailable when the agent runs. Is there any countermeasure to mitigate this issue?
pmerlin1 commentedon Apr 13, 2026
Related: we hit a similar auth issue with WIF and found that the action defaults to Code Assist auth (
cloudcode-pa.googleapis.com) even whenuse_vertex_aiis set, unless you also explicitly setuse_gemini_code_assist: "false".For WIF/service account auth targeting Vertex AI, the working config is:
More detail in my comment on #497: #497 (comment)