summaryrefslogtreecommitdiff
path: root/docs/cli/authentication.md
diff options
context:
space:
mode:
authorTommaso Sciortino <[email protected]>2025-06-25 15:38:18 -0700
committerGitHub <[email protected]>2025-06-25 22:38:18 +0000
commit79c647d486a5ef3cf9eb68f23000525e8d2c4a91 (patch)
tree43dab16125247ef844b8b46a403935356f98f4cd /docs/cli/authentication.md
parent00b24c917e6c6f5e059fec6cb0a5b55789fa1e1e (diff)
Merge "Login with Google Workspace" auth option into "Login with Google" (#1574)
Co-authored-by: Scott Densmore <[email protected]>
Diffstat (limited to 'docs/cli/authentication.md')
-rw-r--r--docs/cli/authentication.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/cli/authentication.md b/docs/cli/authentication.md
index ea2cd623..90553289 100644
--- a/docs/cli/authentication.md
+++ b/docs/cli/authentication.md
@@ -4,9 +4,21 @@ The Gemini CLI requires you to authenticate with Google's AI services. On initia
1. **Login with Google (Gemini Code Assist):**
- - Use this option to log in with the standard, personal account you use for services like Gmail, Google Photos, and Google Drive for personal use (e.g. [email protected]).
+ - Use this option to log in with your google account.
- During initial startup, Gemini CLI will direct you to a webpage for authentication. Once authenticated, your credentials will be cached locally so the web login can be skipped on subsequent runs.
- Note that the web login must be done in a browser that can communicate with the machine Gemini CLI is being run from. (Specifically, the browser will be redirected to a localhost url that Gemini CLI will be listening on).
+ - Users may have to specify a GOOGLE_CLOUD_PROJECT if:
+ 1. You have a Google Workspace account. Google Workspace is a paid service for businesses and organizations that provides a suite of productivity tools, including a custom email domain (e.g. [email protected]), enhanced security features, and administrative controls. These accounts are often managed by an employer or school.
+ 2. You are a licensed Code Assist user. This can happen if you have previously purchased a Code Assist license or have acquired one through Google Developer Program.
+ - If you fall into one of these categories, you must first configure a Google Cloud Project Id to use, [enable the Gemini for Cloud API](https://cloud.google.com/gemini/docs/discover/set-up-gemini#enable-api) and [configure access permissions](https://cloud.google.com/gemini/docs/discover/set-up-gemini#grant-iam). You can temporarily set the environment variable in your current shell session using the following command:
+ ```bash
+ export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
+ ```
+ - For repeated use, you can add the environment variable to your `.env` file (located in the project directory or user home directory) or your shell's configuration file (like `~/.bashrc`, `~/.zshrc`, or `~/.profile`). For example, the following command adds the environment variable to a `~/.bashrc` file:
+ ```bash
+ echo 'export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"' >> ~/.bashrc
+ source ~/.bashrc
+ ```
2. **<a id="gemini-api-key"></a>Gemini API key:**