gemini-cli - 💡(How to fix) Fix Can't login from gemini-cli

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…

Error Message

I used to run gemini-cli with my api key by setting environment variable GEMINI_API_KEY, and I removed it today as I want to switch the auth method from api key to regular google login. When running gemini, it continuously fails to login with this error message:

Root Cause

I tried https://github.com/google-gemini/gemini-cli#if-you-are-using-a-paid-code-assist-license-from-your-organization-remember-to-set-the-google-cloud-project this manual to change the id of gcp, but it didn't change the behavior. brew uninstall then brew install didn't work. I asked to gemini as well, but it gives me complex, not working solutions. One of the solutions gemini gave me is to remove ~/.gemini directory, which I won't do because there are subdirectories that seems I don't want to remove such as antigravity stuffs and skills. Gemini also repeatedly says this is a bug. Is it? Gemini picked #26105 as a relevant issue. If it's a bug, can we fix it? How am I supposed to do?

RAW_BUFFERClick to expand / collapse

I used to run gemini-cli with my api key by setting environment variable GEMINI_API_KEY, and I removed it today as I want to switch the auth method from api key to regular google login. When running gemini, it continuously fails to login with this error message:

Failed to sign in. Message: Cloud Code Private API has not been used in project 687891839131 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudcode-pa.googleapis.com/overview?project=687891839131 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

However, I don't have my own project 687891839131. It's not in my google cloud console. I got totally stuck right there.

I tried https://github.com/google-gemini/gemini-cli#if-you-are-using-a-paid-code-assist-license-from-your-organization-remember-to-set-the-google-cloud-project this manual to change the id of gcp, but it didn't change the behavior. brew uninstall then brew install didn't work. I asked to gemini as well, but it gives me complex, not working solutions. One of the solutions gemini gave me is to remove ~/.gemini directory, which I won't do because there are subdirectories that seems I don't want to remove such as antigravity stuffs and skills. Gemini also repeatedly says this is a bug. Is it? Gemini picked #26105 as a relevant issue. If it's a bug, can we fix it? How am I supposed to do?

updated

Removed ~/.gemini, still not working. gemini still knows that mysterious 687891839131.

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