$ brew install caskroom/cask/google-cloud-sdk
==> brew cask install caskroom/cask/google-cloud-sdk
==> Caveats
google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:
for bash users
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc'
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc'
for zsh users
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc'
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc'
==> Satisfying dependencies
==> Downloading https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz
######################################################################## 100.0%
==> No checksum defined for Cask google-cloud-sdk, skipping verification
==> Installing Cask google-cloud-sdk
==> Running installer script 'google-cloud-sdk/install.sh'
==> Welcome to the Google Cloud SDK!
==>
==>
==> Your current Cloud SDK version is: 195.0.0
==> Installing components from version: 195.0.0
==>
==> +----------------------------------------------------------------------------+
==> | These components will be installed. |
==> +-----------------------------------------------------+------------+---------+
==> | Name | Version | Size |
==> +-----------------------------------------------------+------------+---------+
==> | BigQuery Command Line Tool | 2.0.30 | < 1 MiB |
==> | BigQuery Command Line Tool (Platform Specific) | 2.0.26 | < 1 MiB |
==> | Cloud SDK Core Libraries (Platform Specific) | 2018.03.16 | < 1 MiB |
==> | Cloud Storage Command Line Tool | 4.29 | 3.4 MiB |
==> | Cloud Storage Command Line Tool (Platform Specific) | 4.27 | < 1 MiB |
==> | Default set of gcloud commands | | |
==> | gcloud cli dependencies | 2017.10.20 | 1.4 MiB |
==> +-----------------------------------------------------+------------+---------+
==>
==> For the latest full release notes, please visit:
==> https://cloud.google.com/sdk/release_notes
==>
==> #============================================================#
==> #= Creating update staging area =#
==> #==================
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> #
==> #= Installing: BigQuery Command Line Tool =#
==> #
==> =
==> ==
==> ==
==> ====
==> ==
==> ===
==> ==
==> ==
==> ==
==> ===
==> =
==> ===
==> =
==> ==
==> =
==> =
==> ==
==> ==
==> ==
==> ==
==> ==
==> ==
==> ==
==> ==
==> ==
==> ==
==> ==
==> ==
==> ==
==> =
==> =#
==> #= Installing: BigQuery Command Line Tool (Platform Spec... =#
==> #
==> ==============================
==> ==============================#
==> #= Installing: Cloud SDK Core Libraries (Platform Specific) =#
==> #
==> ==============================
==> ==============================#
==> #= Installing: Cloud Storage Command Line Tool =#
==> #
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> #
==> #= Installing: Cloud Storage Command Line Tool (Platform... =#
==> #
==> ==============================
==> ==============================#
==> #= Installing: Default set of gcloud commands =#
==> #============================================================#
==> #= Installing: gcloud cli dependencies =#
==> #
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> =
==> ==========
==> =========
==> ==
==> =
==> =====
==> ==#
==> #= Creating backup and activating new installation =#
==> #============================================================#
==>
==> Performing post processing steps...
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> .
==> done.
==>
==>
==> This will install all the core command line tools necessary for working with
==> the Google Cloud Platform.
==>
==> Update done!
==>
==> ==> Source [/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc] in your profile to enable shell command completion for gcloud.
==> ==> Source [/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc] in your profile to add the Google Cloud SDK command line tools to yo
==>
==> For more information on how to get started, please visit:
==> https://cloud.google.com/sdk/docs/quickstarts
==>
==>
==> Linking Binary 'bq' to '/usr/local/bin/bq'.
==> Linking Binary 'gcloud' to '/usr/local/bin/gcloud'.
==> Linking Binary 'git-credential-gcloud.sh' to '/usr/local/bin/git-credential-gcloud'.
==> Linking Binary 'gsutil' to '/usr/local/bin/gsutil'.
πΊ google-cloud-sdk was successfully installed!
Last active
July 31, 2018 22:24
-
-
Save jpluimers/494cd3d5467843b37c227de264741cab to your computer and use it in GitHub Desktop.
Using homebrew to install the console client to access Google Cloud Shell
$ gcloud alpha
You do not currently have this command group installed. Using it
requires the installation of components: [alpha]
Your current Cloud SDK version is: 195.0.0
Installing components from version: 195.0.0
ββββββββββββββββββββββββββββββββββββββββββββββββ
β These components will be installed. β
βββββββββββββββββββββββββ¬βββββββββββββ¬ββββββββββ€
β Name β Version β Size β
βββββββββββββββββββββββββΌβββββββββββββΌββββββββββ€
β gcloud Alpha Commands β 2017.09.15 β < 1 MiB β
βββββββββββββββββββββββββ΄βββββββββββββ΄ββββββββββ
For the latest full release notes, please visit:
https://cloud.google.com/sdk/release_notes
Do you want to continue (Y/n)? Y
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β Creating update staging area ββ£
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β β Installing: gcloud Alpha Commands ββ£
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β β Creating backup and activating new installation ββ£
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Performing post processing steps...done.
Update done!
Restarting command:
$ gcloud alpha
ERROR: (gcloud.alpha) Command name argument expected.
Usage: gcloud alpha [optional flags] <group | command>
group may be app | auth | billing | cloud-shell | compute | config |
container | dataflow | deployment-manager | emulators |
endpoints | firebase | functions | genomics | iot |
kms | ml | ml-engine | monitoring | organizations |
projects | pubsub | resource-manager | resources |
scheduler | services | source | spanner | tasks
command may be init | interactive | search-help
For detailed information on this command and its flags, run:
gcloud alpha --help
$ gcloud alpha cloud-shell ssh
ERROR: (gcloud.alpha.cloud-shell.ssh) You do not currently have an active account selected.
Please run:
$ gcloud auth login
to obtain new credentials, or if you have already logged in with a
different account:
$ gcloud config set account ACCOUNT
to select an already authenticated account to use.
Console starting step:
$ gcloud auth login
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&prompt=select_account&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&access_type=offline
WARNING: `gcloud auth login` no longer writes application default credentials.
If you need to use ADC, see:
gcloud auth application-default --help
Web steps:
- At success you end up at https://cloud.google.com/sdk/auth_success
Console finishing when the success page displayed:
You are now logged in as [jeroen.pluimers.com@gmail.com].
Your current project is [None]. You can change this setting by running:
$ gcloud config set project PROJECT_ID
$ gcloud alpha cloud-shell ssh
WARNING: The public SSH key file for gcloud does not exist.
WARNING: The private SSH key file for gcloud does not exist.
WARNING: You do not have an SSH key for gcloud.
WARNING: SSH keygen will be executed to generate a key.
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/jeroenp/.ssh/google_compute_engine.
Your public key has been saved in /Users/jeroenp/.ssh/google_compute_engine.pub.
The key fingerprint is:
SHA256:
........................................... jeroenp@RMBPro1TBJWP.local
The key's randomart image is:
+---[RSA 2048]----+
...................
+----[SHA256]-----+
ERROR: (gcloud.alpha.cloud-shell.ssh) PERMISSION_DENIED: Cloud Shell API has not been used in project google.com:cloudsdktool before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudshell.googleapis.com/overview?project=google.com:cloudsdktool then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
- '@type': type.googleapis.com/google.rpc.Help
links:
- description: Google developers console API activation
url: https://console.developers.google.com/apis/api/cloudshell.googleapis.com/overview?project=google.com:cloudsdktool
The problem is that the URL returns a failure so it cannot be used to enable the API:
https://console.developers.google.com/apis/api/cloudshell.googleapis.com/overview?project=google.com:cloudsdktool -> The API "cloudshell.googleapis.com" doesn't exist or you don't have permission to access it
Only a +1 on https://plus.google.com/+AdrianMariusPopa/posts/XJm7QPFDVHq but no answer yet.
Select/Enable the correct project both in the GUI and console..
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I posted the problem at https://cloudplatform.googleblog.com/2018/03/introducing-the-ability-to-connect-to-Cloud-Shell-from-any-terminal.html and https://cloud.google.com/sdk/gcloud/reference/alpha/cloud-shell/ssh although on the latter, the post somehow is not visible.