5

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

3
  • Have you considered installing gcloud? The error message says it right in your face.
    – kinokijuf
    May 5, 2014 at 12:17
  • yes I have 'curl sdk.cloud.google.com | bash' and then restarted cygwin
    – user320541
    May 5, 2014 at 12:30
  • 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
    May 5, 2014 at 12:53

4 Answers 4

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
1
  • 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
    – raddrick
    Nov 4, 2014 at 17:51
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"
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.

1
  • 3
    This 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.
    – raddrick
    Nov 4, 2014 at 17:48
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .