gemini-cli - 💡(How to fix) Fix Bug: OAuth Not Authorized Error during Sign in with Google" (v0.42.0)

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

in failed" page with the exact error: My terminal subsequently fails and drops the session with the error:

Code Example

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

What happened?

System Information:

OS: CachyOS x86_64

Shell: fish 4.7.1

CLI Version: @google/gemini-cli v0.42.0

I am doing a fresh, clean installation of the CLI. When I attempt to authenticate using my Google account, the OAuth flow fails on Google's backend.

Steps to Reproduce:

Run npm install -g @google/gemini-cli.

Run the gemini command.

Select "1. Sign in with Google" from the setup menu.

The browser opens the OAuth page. I select my Google account.

Actual Result: The browser redirects to a "Sign

https://github.com/user-attachments/assets/fe0a9875-832e-4f7f-87f9-ccb85a6ac60f

in failed" page with the exact error: "The authentication did not complete successfully. The following products are not yet authorized to access your account: Gemini CLI.

My terminal subsequently fails and drops the session with the error: Failed to sign in. Message: Authentication cannot be obtained. Failed to exchange authorization code for token: request to https://www.google.com/search?q=https://oauth2.googleapis.com/token

What did you expect to happen?

The OAuth flow should complete successfully, exchanging the authorization code for a token, and the CLI should authenticate my account so I can begin using it.and its also i wanna latest version of Gemini CLI

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

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 Bug: OAuth Not Authorized Error during Sign in with Google" (v0.42.0)