Skip to content

Instantly share code, notes, and snippets.

@hamdifourati
Last active April 16, 2020 09:31
Show Gist options
  • Save hamdifourati/9efaba113bc4cc3423a1a93674335002 to your computer and use it in GitHub Desktop.
Save hamdifourati/9efaba113bc4cc3423a1a93674335002 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Usage:
# curl -s https://gist.githubusercontent.com/hamdifourati/9efaba113bc4cc3423a1a93674335002/raw/google-cloud-sdk-debian.sh | sudo bash
#
set -ex
apt install apt-transport-https ca-certificates gnupg -y
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
apt update && apt install google-cloud-sdk -y
gcloud --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment