원격 터미널 세션에 있는 경우, --no-launch-browser 플래그를 사용하여 명령어가 브라우저 기반 승인 흐름을 시작하지 못하게 할 수 있습니다.
gcloud init --no-launch-browser
메시지가 표시되면 구성을 만들거나 선택합니다.
새 gcloud CLI 설치를 초기화하는 경우, gcloud init이 default라는 이름의 구성을 만들고 이를 활성 구성으로 설정합니다. 기존 구성이 있는 경우, gcloud init은 활성 구성 다시 초기화, 다른 구성으로 전환한 후 이 구성을 다시 초기화 또는 새 구성 만들기 등 세 가지 옵션 중 하나를 선택하라는 메시지가 표시될 수 있습니다.
메시지가 나타나면 승인 단계를 완료합니다.
이전에Google Cloud에 대한 액세스가 승인됐는지 여부에 따라 웹브라우저에서 로그인하고 액세스 권한을 부여하거나 기존 계정을 선택하라는 메시지가 표시될 수 있습니다.
--no-launch-browser 플래그를 사용했고 로그인해야 하는 경우, 제공된 승인 URL을 복사하여 다른 브라우저 창에 붙여넣고 제공되는 메시지를 따라야 합니다.
이 단계가 완료되면 gcloud init은 구성의 account 속성을 지정된 계정으로 설정합니다.
메시지가 표시되면 현재 Google Cloud 프로젝트를 선택합니다.
사용자 계정의 기본 프로젝트를 포함하여 프로젝트 하나에만 액세스할 수 있는 경우 gcloud init가 이 프로젝트를 선택합니다.
그렇지 않으면 사용자가 소유자, 편집자 또는 뷰어 권한을 가진 프로젝트 목록에서 프로젝트를 선택할 수 있습니다. gcloud init는 구성의 project 속성을 사용자가 선택하는 속성으로 설정합니다. 200개가 넘는 프로젝트에 액세스할 수 있는 경우 프로젝트 ID를 입력하거나 새 프로젝트를 만들거나 프로젝트를 나열하라는 메시지가 표시됩니다.
This account has a lot of projects! Listing them all can take a while.
[1] Enter a project ID
[2] Create a new project
[3] List projects
Please enter your numeric choice:
메시지가 표시되면 기본 Compute Engine 영역을 선택합니다.
Compute Engine API를 사용 설정하지 않았거나 이미 프로젝트 수준 메타데이터에 기본 영역이 있는 경우에는 이 단계가 나타나지 않습니다. gcloud init는 사용자가 선택한 영역을 사용하여 구성의 region 및 zone 속성을 설정합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Initializing the gcloud CLI\n\nThis page shows you how to initialize the gcloud CLI.\n\nAfter you install the gcloud CLI, perform initial setup tasks by running\n[`gcloud init`](/sdk/gcloud/reference/init). You can also run `gcloud init`\nto change your settings or create a new configuration.\n\n`gcloud init` performs the following setup steps:\n\n- [Authorizes](/sdk/docs/authorizing) the gcloud CLI to use your user account credentials to access Google Cloud, or lets you select an account if you have previously authorized access\n- Sets up a gcloud CLI [configuration](/sdk/docs/configurations) and sets a base set of [properties](/sdk/docs/properties), including the active account from the step above, the current project, and if applicable, the default Compute Engine region and zone\n\nYou can run the following as alternatives to `gcloud init`:\n\nInitialize the gcloud CLI\n-------------------------\n\nTo initialize the gcloud CLI:\n\n1. Run `gcloud init`:\n\n gcloud init\n\n If you are in a remote terminal session, you can use the `--no-launch-browser`\n flag to prevent the command from launching a browser-based authorization\n flow, if required: \n\n gcloud init --no-launch-browser\n\n2. Create or select a configuration if prompted.\n\n If you are initializing a new gcloud CLI installation,\n `gcloud init` creates a configuration named `default` for you and sets\n it as the active configuration. If you have existing configurations,\n `gcloud init` prompts you to choose between three options ---\n re-initialize the active one, switch to another one and re-initialize it, or\n create a new one.\n3. Complete the authorization step when prompted.\n\n Depending on whether you have previously authorized access to\n Google Cloud, you might be prompted to log in and grant access in a\n web browser or to select an existing account.\n\n If you used the `--no-launch-browser` flag and login is required,\n you must then copy and paste the provided authorization URL into another\n browser window and follow the prompts provided.\n\n When this step is completed, `gcloud init` sets the `account` property in\n the configuration to the specified account.\n4. Choose a current Google Cloud project if prompted.\n\n If you only have access to one project, including the default project for\n your user account, `gcloud init` selects it for you.\n\n Otherwise, you can\n select a project from a list of projects for which you have **Owner** ,\n **Editor** or **Viewer** permissions. `gcloud init` sets the `project`\n property in the configuration to the property you choose. If you have\n access to more than 200 projects, you will be prompted to enter\n a project id, create a new project, or list projects. \n\n ```\n This account has a lot of projects! Listing them all can take a while.\n [1] Enter a project ID\n [2] Create a new project\n [3] List projects\n Please enter your numeric choice:\n ```\n | **Note:** If you choose to create a project, you'll also need to [enable billing on your project](/billing/docs/how-to/modify-project) to use Google Cloud services.\n5. Choose a default Compute Engine zone if prompted.\n\n If you don't have the Compute Engine API enabled or you already\n have a default zone in your\n [project-level metadata](/compute/docs/metadata), you will not see this\n step. `gcloud init` sets the `region` and `zone` properties in the\n configuration using the zone you choose.\n\nTo view the properties set through the `gcloud init` command, use the\n[`gcloud config list`](/sdk/gcloud/reference/config/list) command. \n\n```sh\n[compute]\nregion = us-east1\nzone = us-east1-b\n[core]\naccount = dana@example.com\ndisable_usage_reporting = False\nproject = example-project\n```\n\nWhat's next\n-----------\n\n- To learn more about tool authorization, see [Authorizing the gcloud CLI](/sdk/docs/authorizing).\n- To learn more about authorizing Application Default Credentials (ADC) for Cloud Client Libraries (and Google API Client Libraries), see [Set up Application Default Credentials](/docs/authentication/provide-credentials-adc#how-to).\n- To learn more about managing configurations, see [gcloud CLI configurations](/sdk/docs/configurations).\n- To learn more about managing properties, see [gcloud CLI properties](/sdk/docs/properties)."]]