Install and configure Google Cloud SDK using Homebrew

0
24771
Install and configure Google Cloud SDK using Homebrew

This is a short and quick guide to install and configure Google Cloud SDK using Homebrew. If you are not using Homebrew to manage your packages, then you can follow the official guide to setup directly into Mac.

Step 1: Prepare Homebrew

If you don’t have Homebrew, then you need to install it first. Open your terminal of choice then type following command to get Homebrew for your Mac.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Verify installation by:

$ brew --version
Homebrew 2.2.6
Homebrew/homebrew-core (git revision ae7c1; last commit 2020-02-22)
Homebrew/homebrew-cask (git revision 2eac7b; last commit 2020-02-23)

You might want to install the cask plugin if you’re using old Homebrew version, which extends Homebrew functionalities to install more stuffs on Mac machine. Use following command to get it.

$ brew tap caskroom/cask

Step 2: Install Google Cloud SDK

Now, we get the CLI for Google Cloud, type following command:

$ brew cask install google-cloud-sdk

It might take a while to install, just wait for it to complete.

After installation, you can verify the installation by issuing:

$ gcloud version
Google Cloud SDK 281.0.0
bq 2.0.53
core 2020.02.14
gsutil 4.47

Step 3: Authenticate Google Cloud Developer account

Finally step is to authenticate to your Google Cloud Developer account to manage.

$ gcloud auth login

It will display an URL, you open it via browser, and login with the associated account on Google and allow the SDK with listed permissions.

Then it’s done. No complication to install and configure Google Cloud SDK using Homebrew.

You can start to manage the cloud now!

Some references you might want to take a look at: