I am having trouble trying to authenticate Google SDK using cygwin

4

I am trying to install SDK using Cygwin as instructed here https://developers.google.com/cloud/sdk/#Quick_Start

after Cygwin is installed I follow the guide and then try to authenticate using the gcloud auth login command, but get the following returned and do not know how to remedy.

> $ gcloud auth login
> -bash: gcloud: command not found

sorry I am not that technical, so I am sorry this is fairly basic, but I have tried searching and can't find a solution, so thanks in anticipation for any help

user320541

Posted 2014-05-05T11:57:00.573

Reputation: 41

Have you considered installing gcloud? The error message says it right in your face. – kinokijuf – 2014-05-05T12:17:37.483

yes I have 'curl https://sdk.cloud.google.com | bash' and then restarted cygwin

– user320541 – 2014-05-05T12:30:21.487

BTW this is the contents of the directory I am running the command from and as you can see it shows Gcloud $ ls -F gcloud auth login google-cloud-sdk/ y/ – user320541 – 2014-05-05T12:53:25.250

Answers

3

The command may not be in the $PATHso you need to use the path to the command. You can run a command from the current folder with./ in front:

./gcloud auth login

Kevin Panko

Posted 2014-05-05T11:57:00.573

Reputation: 6 339

its not in your path, you can likely find it in your home directory, assuming that you installed with the default settings... ~/google-cloud-sdk/bin% ./gcloud auth login should work – RGB – 2014-11-04T17:51:31.103

3

You should verify that your path is setup correctly...youre using cygwin, so i presume its a windows machine...

see here for details on updating the path in various windows environments... https://www.java.com/en/download/help/path.xml

For bash Shell: 1. Edit the startup file (~/ .bashrc) 2. Modify PATH variable: PATH="$PATH":~/google-cloud-sdk/bin 3. export PATH

in unix/linux/mac you could run

export PATH="$HOME/google-cloud-sdk/bin:$PATH"

RGB

Posted 2014-05-05T11:57:00.573

Reputation: 131

1

Download and install Google Cloud SDK by running the following command in your shell or Terminal:

curl https://sdk.cloud.google.com | bash

(Or, you can download google-cloud-sdk.zip or google-cloud-sdk.tar.gz, unpack it, and launch the ./google-cloud-sdk/install.sh script.)

Restart your shell or Terminal.

Authenticate to Google Cloud Platform by running gcloud auth login.

determinacy

Posted 2014-05-05T11:57:00.573

Reputation: 19

2This is not helpful, all you have done is copy and pasted the quick start guide, that he provided in the OP. He is having troubles beyond this point. obviously. – RGB – 2014-11-04T17:48:07.643

0

I just ran into this same issue (and even ended up here off a google search too). But for me the issue was solved by breaking apart the command google gives here in Step 4:

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

into separate commands:

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

Since there were a couple of packages unrelated to the Google SDK that failed to download during the apt-get update command, the only guess I have is that stopped the command on the other side of the logical && from executing.

When I executed the second command by itself instead, the google-cloud-sdk package installed as a new package, so I assume the compound command from before failed.

After this the instructions in Step 5 (to execute gcloud auth login) was successful.

Hope this helps anyone else on Ubuntu/Debian for whom the other solutions didn't work.

Developer Dave

Posted 2014-05-05T11:57:00.573

Reputation: 101