Skip to content

gcloud init

Zhenyi Liu edited this page Jul 21, 2019 · 5 revisions

After you have

  • Created a GCP account and project
  • Installed the command line tools (SDK)

then you are ready to initialize access to your account. This happens by responding to the queries from the command line call

gcloud init

A typical output of the gcloud init interaction is below.

gcloud init
Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.                                              
Reachability Check passed.
Network diagnostic (1/1 checks) passed.

You must log in to continue. Would you like to log in (Y/n)?  Y

Your browser has been opened to visit:

    https://XXXX-VERY LONG --- XXX

[90209:90243:0807/154855.970886:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.
Created new window in existing browser session.

Created new window in existing browser session.
You are logged in as: [bwandell@gmail.com].

Pick cloud project to use: 
 [1] primal-surfer-140120
 [2] Create a new project
Please enter numeric choice or text value (must exactly match list 
item):  1

Your current project has been set to: [primal-surfer-140120].

Your project default Compute Engine zone has been set to [us-west1-b].
You can change it by running [gcloud config set compute/zone NAME].

Your project default Compute Engine region has been set to [us-west1].
You can change it by running [gcloud config set compute/region NAME].

Created a default .boto configuration file at [/home/wandell/.boto]. See this file and
[https://cloud.google.com/storage/docs/gsutil/commands/config] for more
information about configuring Google Cloud Storage.
Your Google Cloud SDK is configured and ready to use!

* Commands that require authentication will use bwandell@gmail.com by default
* Commands will reference project `primal-surfer-140120` by default
* Compute Engine commands will use region `us-west1` by default
* Compute Engine commands will use zone `us-west1-b` by default

Run `gcloud help config` to learn how to change individual settings

This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Run `gcloud topic configurations` to learn more.
source ~/.bash_profile

Clone this wiki locally