Termux: Install Google Cloud CLI

Published 20 hours ago: January 16, 2021

Install gcloud CLI to access Google Cloudh Shell through SSH on Android using Termux

These instructions specifically targets the following error during installation:

ERROR: (gcloud.components.update) The following components are unknown [anthoscli, kuberun].
  1. First: Run
    • curl https://sdk.cloud.google.com | bash
    • Note: This will fail when trying to install components. Ignore this.
  2. Then ~/google-cloud-sdk/install.sh --override-components
    • (without specifying components)
    • Will add gcloud to $PATH
  3. And then gcloud components install gsutil
  4. Finally gcloud init

Google cloud's shell can finally be accessed with gcloud cloud-shell ssh