Google Cloud SDK
Note
This page contains instructions for installing command-line tools.
This is not required in order to use pittgoogle-client
itself but
is helpful for some use cases. If you don’t know whether you need this,
skip it for now.
The Google Cloud command-line tools include
default components:
gcloud
, bq
, and gsutil
.
For complete install instructions, see Install the gcloud CLI Windows users will need to use the installer found at that link. For Linux and Mac, the basic command is:
curl https://sdk.cloud.google.com | bash
In either case, follow the instructions to complete the installation. Then, open a new terminal or restart your shell. Make sure your environment variables are set, reset them if needed. Then initialize gcloud using:
gcloud init
and follow the directions. You will likely need to authenticate using the Gmail address (or similar) that is registered with your Google Cloud project. Note that this may open a browser and ask you to complete the setup there.
The remaining steps are recommended but optional.
Set your new project as the default:
gcloud config set project "$GOOGLE_CLOUD_PROJECT"
Instruct gcloud to authenticate using your key file containing service account credentials:
gcloud auth activate-service-account \
--project="$GOOGLE_CLOUD_PROJECT" \
--key-file="$GOOGLE_APPLICATION_CREDENTIALS"
You may want to create a configuration if you use multiple projects or want to control settings like the default region.