GCP SDK Setup


1. Set up Google Cloud Platform (GCP)

export GOOGLE_APPLICATION_CREDENTIALS="/home/pi/gcp/pines1-6e82e765805d.json"

2. Install GCP SDK

Installing with apt-get for Debian and Ubuntu

export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"

echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

sudo apt-get update && sudo apt-get install google-cloud-sdk

3. Setup GCloud SDK

gcloud init

4. Authorizing Cloud SDK tools

Authorizing a service accounts

gloud auth login
gcloud auth application-default login
gcloud auth list