gemini-cli - 💡(How to fix) Fix 主题:Gemini CLI 使用 Google 账号登录后仍返回 403 PERMISSION_DENIED [5 comments, 6 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#25268Fetched 2026-04-14 05:56:22
View on GitHub
Comments
5
Participants
6
Timeline
9
Reactions
4
Author
Timeline (top)
commented ×5labeled ×2subscribed ×2

Error Message

"error": {

Code Example

> /about
# paste output here
RAW_BUFFERClick to expand / collapse

What happened?

你好,

我在使用 Gemini CLI 时遇到了持续性的授权问题。

账号情况:

  • 个人 Google 账号
  • 该账号已订阅 Google AI Pro

问题现象:

  • 使用 Google 账号登录 Gemini CLI 时,浏览器认证成功
  • CLI 也提示认证成功
  • 但实际发送任何请求时都会返回 HTTP 403 PERMISSION_DENIED

报错内容: “The caller does not have permission”

我已经完成的排查:

  • 已完整卸载并重新安装 Gemini CLI
  • 已清空本地状态目录(~/.gemini)后重新登录
  • 已确认不存在以下环境变量干扰: GEMINI_API_KEY GOOGLE_API_KEY GOOGLE_CLOUD_PROJECT GOOGLE_CLOUD_LOCATION GOOGLE_GENAI_USE_VERTEXAI GOOGLE_GENAI_USE_GCA
  • 当前认证类型是 oauth-personal
  • 当前登录账号是个人 Gmail
  • 使用最小命令也能稳定复现: gemini -p 'Reply with exactly: OK'

观察到的行为:

  • OAuth 登录成功
  • 浏览器页面显示 Gemini CLI 身份验证成功
  • 但实际后端请求返回 403
  • 请求似乎发往: https://cloudcode-pa.googleapis.com/...
  • 返回错误: { "error": { "code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED" } }

另外,在测试 API key 方案时,我还遇到:

  • “Your project has been denied access. Please contact support.”
  • 以及额度相关信息,显示 gemini-3.1-pro 的 free-tier limit 为 0

希望协助确认:

  • 我的个人 Google 账号是否当前具备 Gemini CLI 的使用资格
  • 是否存在账号、地区、项目、产品资格或风控限制,导致该 403 问题

如果需要,我可以继续提供:

  • 完整 CLI 错误日志
  • 报错时间
  • 账号邮箱
  • API key 测试涉及的项目 ID

谢谢。

What did you expect to happen?

如何解决此问题

Client information

<details> <summary>Client Information</summary>

Run gemini to enter the interactive CLI, then run the /about command.

> /about
# paste output here
</details>

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The most likely fix is to verify the account's eligibility and permissions for using Gemini CLI, and check for any project, region, or product restrictions that may be causing the 403 PERMISSION_DENIED error.

Guidance

  • Check the account's subscription status and ensure it has the necessary permissions for Google AI Pro and Gemini CLI.
  • Verify that the project ID used in the API key test is correct and has not been denied access.
  • Investigate potential region or product restrictions that may be causing the 403 error.
  • Consider providing the complete CLI error log, error timestamp, account email, and API key test project ID for further assistance.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue may be related to account or project settings, and providing more information about the account and project configuration may be necessary to resolve the issue.

Recommendation

Apply workaround: Verify account eligibility and permissions, and check for project or region restrictions, as the issue is likely related to account or project settings rather than a code problem.

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