Skip to main content
Watch: Grok Bot Built My AI Video Arena While I Tested 8 Models

Gemini CLI error

Gemini CLI: This account requires setting the GOOGLE_CLOUD_PROJECT or...

Error message
This account requires setting the GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID env var. See https://geminicli.com/docs/get-started/authentication/#set-gcp

Status: By designLast verified 2 documented fixes7 sources

What it means

Sign in with Google succeeded, but the account type (Workspace, school, company, or a Code Assist license) needs a Google Cloud project for Gemini CLI to use. Older reports quote it as "Failed to login. Message: This account requires seting the GOOGLE_CLOUD_PROJECT env var" (title of #8435, verbatim).

Causes

  • Per the authentication docs, a Google Cloud project is required when you use a company, school, or Google Workspace account, a Gemini Code Assist license from the Google Developer Program, or a license from a Gemini Code Assist subscription.
  • A contributor in #8435 said #17852 should fix it: "You will now see the actual onboarding error message." Per #17852, specific Code Assist setup errors (like "Unsupported Location") were being masked by a generic ProjectIdRequiredError.

How to fix it

  1. Fix 1.

    Follow the docs: find your Google Cloud project ID, enable the Gemini for Cloud API, configure the necessary IAM permissions, then set GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID (GOOGLE_CLOUD_PROJECT is checked first). Windows PowerShell: $env:GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"

    Terminal
    export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
  2. Fix 2.

    Upgrade to v0.28.0 or later, which includes #17852 "fix(core): prioritize detailed error messages for code assist setup", so the real onboarding error is shown. The GOOGLE_CLOUD_PROJECT_ID fallback arrived in v0.10.0 (#2725).

    Terminal
    npm install -g @google/gemini-cli@latest

More Gemini CLI errors

All 19 Gemini CLI errors

FAQ

What does "This account requires setting the GOOGLE_CLOUD_PROJECT or..." mean in Gemini CLI?

Sign in with Google succeeded, but the account type (Workspace, school, company, or a Code Assist license) needs a Google Cloud project for Gemini CLI to use. Older reports quote it as "Failed to login. Message: This account requires seting the GOOGLE_CLOUD_PROJECT env var" (title of #8435, verbatim).

How do I fix "This account requires setting the GOOGLE_CLOUD_PROJECT or..."?

There are 2 documented fixes. Start with the first: Follow the docs: find your Google Cloud project ID, enable the Gemini for Cloud API, configure the necessary IAM permissions, then set GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID (GOOGLE_CLOUD_PROJECT is checked first). Windows PowerShell: $env:GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"

Is this Gemini CLI error fixed?

Status: By design. Expected behavior, not a bug. The documented fixes change the setup that triggers it. Affected versions: Reported on 0.7.0-nightly.20250912.68035591 (#8435); detailed onboarding errors from v0.28.0 (#17852); GOOGLE_CLOUD_PROJECT_ID fallback from v0.10.0 (#2725)

Sources

Last verified against 7 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.