From 79c647d486a5ef3cf9eb68f23000525e8d2c4a91 Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Wed, 25 Jun 2025 15:38:18 -0700 Subject: Merge "Login with Google Workspace" auth option into "Login with Google" (#1574) Co-authored-by: Scott Densmore --- docs/cli/authentication.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'docs/cli') 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. your-name@gmail.com). + - 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. your-name@your-company.com), 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. **Gemini API key:** -- cgit v1.2.3