gcloud auth login redirect to localhost fails

5,528 views
Skip to first unread message

Morgan Sowden

unread,
Mar 9, 2015, 7:54:29 AM3/9/15
to google-c...@googlegroups.com

gcloud auth login redirect to localhost fails, so I've been using  --no-launch-browser (for many months). However, I'd like to get to the bottom of it now. 

I'm assuming I need some kind of service to be running locally to capture that redirect. But How Can I check what it is and if it is running? Any help welcome.

I'm on OSX 10.10.2

-------------------------------------------------------------------------------

|                                  Packages                                   |

|-----------------------------------------------------------------------------|

| Status        | Name                                    | ID         | Size |

|---------------+-----------------------------------------+------------+------|

| Not Installed | Cloud SDK for Go Developers             | pkg-go     |      |

| Not Installed | Cloud SDK for Java Developers           | pkg-java   |      |

| Installed     | Cloud SDK Core Command Line Tools       | pkg-core   |      |

| Installed     | Cloud SDK for Python and PHP Developers | pkg-python |      |

-------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------

|                                         Individual Components                                          |

|--------------------------------------------------------------------------------------------------------|

| Status        | Name                                          | ID                          |     Size |

|---------------+-----------------------------------------------+-----------------------------+----------|

| Not Installed | App Engine Command Line Interface (Preview)   | app                         |   < 1 MB |

| Not Installed | App Engine SDK for Go                         | gae-go                      |          |

| Not Installed | App Engine SDK for Java                       | gae-java                    | 162.5 MB |

| Not Installed | Developer Preview gcloud Commands             | preview                     |   < 1 MB |

| Not Installed | gcloud Alpha Commands                         | alpha                       |   < 1 MB |

| Not Installed | gcloud Beta Commands                          | beta                        |   < 1 MB |

| Not Installed | gcloud app Go Extensions (Mac OS X, x86_64)   | app-engine-go-darwin-x86_64 |  24.6 MB |

| Not Installed | gcloud app Java Extensions                    | app-engine-java             |  92.9 MB |

| Installed     | App Engine Launcher Application for Mac       | gae-python-launcher-mac     |  18.8 MB |

| Installed     | App Engine SDK for Python and PHP             | gae-python                  |   < 1 MB |

| Installed     | BigQuery Command Line Tool                    | bq                          |   < 1 MB |

| Installed     | Cloud DNS Admin Command Line Interface        | dns                         |   < 1 MB |

| Installed     | Cloud SDK Core Libraries                      | core                        |   1.6 MB |

| Installed     | Cloud SQL Admin Command Line Interface        | sql                         |   < 1 MB |

| Installed     | Cloud Storage Command Line Tool               | gsutil                      |   2.0 MB |

| Installed     | Compute Engine Command Line Interface         | compute                     |   < 1 MB |

| Installed     | Compute Engine Command Line Tool (deprecated) | gcutil                      |   < 1 MB |

| Installed     | gcloud app Python Extensions                  | app-engine-python           |   6.8 MB |

----------------------------------------------------------------------------------------------------------

Stephen Weinberg

unread,
Mar 16, 2015, 10:53:20 AM3/16/15
to google-c...@googlegroups.com
Can you run gcloud info? Also, what happens when you try to run it without --no-launch-browser?

Morgan Sowden

unread,
Mar 16, 2015, 12:04:20 PM3/16/15
to google-c...@googlegroups.com
Hi Stephen, 

Thanks for the help.

1) Below is the output I get when I run gcloud info.

2) When I run it without ----no-launch-browser i just get "page not found" when it attempts to redirect to http://localhost:8080/?code=4/xxxxxx after authenticating with Google, and granting access to AppEngine to my account. 

------

Installation Properties: [/Developer/google-cloud-sdk/properties]
User Config Directory: [/Users/morgan/.config/gcloud]
User Properties: [/Users/morgan/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]

Workspace Properties: [None]
Account: [******@******.***]
Project: [*******]

Current Properties:

  [core]

    project: [******]
    account: [******@******.**]
    disable_usage_reporting: [True]

Logs Directory: [/Users/morgan/.config/gcloud/logs]
Last Log File: [/Users/morgan/.config/gcloud/logs/2015.03.09/13.56.20.590246.log]

Nathan McKaskle

unread,
May 26, 2015, 4:50:50 PM5/26/15
to google-c...@googlegroups.com
I am having the exact same problem on OS 10.10.3

Valentin Stanciu

unread,
May 26, 2015, 6:14:40 PM5/26/15
to Nathan McKaskle, google-c...@googlegroups.com
Please give us the output of gcloud info if you are having the same problem.

Did you guys try "gcloud components update"?
From the output of Morgan's gcloud info I think it's because you are using an old version of cloud SDK.

Valentin

--
You received this message because you are subscribed to the Google Groups "google-cloud-sdk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-cloud-sdk.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sdk/6f4a95b6-d55e-4898-8754-586b6145927f%40googlegroups.com.

Nathan

unread,
May 26, 2015, 6:23:03 PM5/26/15
to Valentin Stanciu, google-c...@googlegroups.com
I got past the problem with the --no-launch-browser option but then I ran into yet another problem. I'm running through this tutorial (https://cloud.google.com/nodejs/getting-started/hello-world). All I get when trying to deploy the app is this:

ERROR: (gcloud.preview.app.deploy) Couldn't connect to the docker daemon.

Please check if the environment variables DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly. If you are using boot2docker, you can set them up by executing the commands that are shown by:

boot2docker shellinit


I may just give up and try another route.

Seth Thompson

unread,
May 27, 2015, 9:05:28 PM5/27/15
to google-c...@googlegroups.com, nathan....@gmail.com, sval...@google.com
Hi Nathan,

Are you on OSX?  If so, you probably are running Docker inside of a virtual machine managed by boot2docker.  In order to connect to the Docker daemon, your current shell must have the proper environment variables set up.  You can set the variables by running:
$(boot2docker shellinit)
You'll have to remember to run that command in every open shell window before `gcloud preview app deploy` works.  (This also assumes that you've already run `boot2docker start` as per these instructions: https://cloud.google.com/tutorials/install-docker)

Given the hassle with installing Docker/Boot2docker locally, we're working on a method to deploy apps that doesn't rely on Docker locally.  We'll update the tutorial as soon as it's ready.

On Tuesday, May 26, 2015 at 3:23:03 PM UTC-7, Nathan McKaskle wrote:
I got past the problem with the --no-launch-browser option but then I ran into yet another problem. I'm running through this tutorial (https://cloud.google.com/nodejs/getting-started/hello-world). All I get when trying to deploy the app is this:

ERROR: (gcloud.preview.app.deploy) Couldn't connect to the docker daemon.

Please check if the environment variables DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly. If you are using boot2docker, you can set them up by executing the commands that are shown by:

boot2docker shellinit


I may just give up and try another route.


To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sdk+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages