gemini-cli - 💡(How to fix) Fix Google One AI Pro OAuth login succeeds, but all Gemini CLI requests fail with 403 PERMISSION_DENIED [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25797Fetched 2026-04-23 07:45:10
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1labeled ×1

I can successfully sign in with Google in Gemini CLI, and the UI shows:

  • Signed in with Google
  • Plan: Gemini Code Assist in Google One AI Pro

However, any prompt immediately fails with:

  • 403 PERMISSION_DENIED
  • The caller does not have permission

This happens even after reducing the environment to a minimal OAuth-only setup.

Error Message

Failed to retrieve user quota _GaxiosError: The caller does not have permission

Root Cause

  • This is not an API key flow. The CLI clearly shows Signed in with Google.
  • The issue persists even with GOOGLE_CLOUD_PROJECT unset.
  • The proxy is working correctly, since requests do reach Google backend services.
  • keytar falls back to file storage on my machine, but that does not appear to be the root cause, because OAuth credentials are loaded and requests are sent successfully before the backend returns 403.

Code Example

unset GEMINI_API_KEY
   unset GOOGLE_GEMINI_BASE_URL
   unset GOOGLE_CLOUD_PROJECT

   export http_proxy=http://127.0.0.1:7890
   export https_proxy=http://127.0.0.1:7890
   export ftp_proxy=http://127.0.0.1:7890
   export ALL_PROXY=http://127.0.0.1:7890
   export GEMINI_SKILLS_PATH="$HOME/.gemini/skills"

---

gemini

---

hello

---

你好

---

403 PERMISSION_DENIED
The caller does not have permission

---

env http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890 gemini -d -p "hello"

---

Failed to retrieve user quota _GaxiosError: The caller does not have permission

---

{"project":"<unexpected-project-id>"}

---

url: 'https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota'
body: '{"project":"<unexpected-project-id>"}'
status: 403
message: 'The caller does not have permission'

---

url: 'https://cloudcode-pa.googleapis.com/v1internal:generateContent'
status: 403
message: 'The caller does not have permission'

---

url: 'https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse'
status: 403
message: 'The caller does not have permission'
RAW_BUFFERClick to expand / collapse

Description

I can successfully sign in with Google in Gemini CLI, and the UI shows:

  • Signed in with Google
  • Plan: Gemini Code Assist in Google One AI Pro

However, any prompt immediately fails with:

  • 403 PERMISSION_DENIED
  • The caller does not have permission

This happens even after reducing the environment to a minimal OAuth-only setup.

Gemini CLI Version

  • gemini-cli 0.38.2

Platform

  • macOS
  • Apple Silicon / arm64

Date Observed

  • April 22, 2026

Reproduction

  1. Start with OAuth-only environment variables:

    unset GEMINI_API_KEY
    unset GOOGLE_GEMINI_BASE_URL
    unset GOOGLE_CLOUD_PROJECT
    
    export http_proxy=http://127.0.0.1:7890
    export https_proxy=http://127.0.0.1:7890
    export ftp_proxy=http://127.0.0.1:7890
    export ALL_PROXY=http://127.0.0.1:7890
    export GEMINI_SKILLS_PATH="$HOME/.gemini/skills"
  2. Start Gemini CLI:

    gemini
  3. Sign in with Google via /auth

  4. Send a simple prompt such as:

    hello

    or

    你好

Actual Result

The CLI shows Signed in with Google and recognizes my plan as Gemini Code Assist in Google One AI Pro, but every request fails with:

403 PERMISSION_DENIED
The caller does not have permission

Expected Result

After successful Google OAuth login, prompts should work normally for a Google One AI Pro user.

Debug Output

Running:

env http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890 gemini -d -p "hello"

shows that the failure happens against cloudcode-pa.googleapis.com, for example:

  • https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota
  • https://cloudcode-pa.googleapis.com/v1internal:generateContent
  • https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse

The first failure already occurs during quota retrieval:

Failed to retrieve user quota _GaxiosError: The caller does not have permission

Important detail: the request body contains an unexpected project value that I did not explicitly configure, e.g.:

{"project":"<unexpected-project-id>"}

So it looks like the OAuth / Code Assist path may be binding me to some backend-selected project, and permission is then denied on that project.

Relevant Log Snippets

Quota retrieval request:

url: 'https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota'
body: '{"project":"<unexpected-project-id>"}'
status: 403
message: 'The caller does not have permission'

Content generation request:

url: 'https://cloudcode-pa.googleapis.com/v1internal:generateContent'
status: 403
message: 'The caller does not have permission'

Streaming request:

url: 'https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse'
status: 403
message: 'The caller does not have permission'

Trace IDs

Observed trace IDs:

  • 3c3a18e3b3d1f326
  • 2f771f5e304a03f3
  • c93a86b7b277c14a
  • 4eec5903059b82f3
  • c665a11bf123a86b

Notes

  • This is not an API key flow. The CLI clearly shows Signed in with Google.
  • The issue persists even with GOOGLE_CLOUD_PROJECT unset.
  • The proxy is working correctly, since requests do reach Google backend services.
  • keytar falls back to file storage on my machine, but that does not appear to be the root cause, because OAuth credentials are loaded and requests are sent successfully before the backend returns 403.

Question

Is this a known entitlement / backend project-binding issue for Gemini Code Assist in Google One AI Pro accounts?

If needed, I can also provide redacted CLI-generated JSON error reports on request.

extent analysis

TL;DR

The most likely fix is to configure the correct project ID for the Gemini Code Assist in Google One AI Pro account, as the current setup is binding to an unexpected project, causing permission denied errors.

Guidance

  • Verify that the GOOGLE_CLOUD_PROJECT environment variable is not set, as the issue persists even when it's unset, indicating the project ID might be inferred from another source.
  • Check the OAuth configuration to ensure that the correct project ID is being used, as the request body contains an unexpected project value.
  • Investigate the possibility of a default or fallback project ID being used by the Gemini CLI, which might be causing the permission denied errors.
  • Consider providing the redacted CLI-generated JSON error reports for further analysis, as they may contain additional information about the issue.

Example

No code snippet is provided, as the issue seems to be related to configuration and project ID binding rather than code.

Notes

The issue appears to be specific to the Gemini Code Assist in Google One AI Pro account and the way it handles project IDs and OAuth configurations. The fact that the CLI shows "Signed in with Google" and recognizes the plan, but still returns permission denied errors, suggests a misconfiguration or entitlement issue.

Recommendation

Apply a workaround by configuring the correct project ID for the Gemini Code Assist in Google One AI Pro account, if possible, to resolve the permission denied errors. This may involve updating the OAuth configuration or setting the GOOGLE_CLOUD_PROJECT environment variable to the correct value.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Google One AI Pro OAuth login succeeds, but all Gemini CLI requests fail with 403 PERMISSION_DENIED [1 participants]