gana2188 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gcloud auth login cannot complete #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.follow gcutil Too installation
2.after installation, run gcloud auth login
3. not sure what to expect, it shows up an as attached files.

What is the expected output? What do you see instead?
Not sure what to expect. [submit] button does not work.

What version of the product are you using? On what operating system?
v1

Please provide any additional information below.

Original issue reported on code.google.com by sxw...@gmail.com on 7 Jan 2014 at 11:15

Attachments:

GoogleCodeExporter commented 9 years ago
The only way to get out, it seems, is to quit. Then it hangs as follows:

test@CarmeloDev:~$ gcloud auth login
Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbigquery+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdevstorage.full_control+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fndev.cloudman+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsqlservice.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fprediction&redirect_uri=http%3A%2F%2Flocalhost%3A8086%2F&response_type=code&client_id=32555940559.apps.googleusercontent.com&access_type=offline

The only way to get out is ctrlC, which generates the following errors:

^CTraceback (most recent call last):                                            
     File 
"/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/gcloud.py   ", 
line 87, in <module>                                                            
    main()                                                                      
     File 
"/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/gcloud.py   ", 
line 84, in main                                                                
    _loader.Execute()                                                           
     File 
"/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init_   
_.py", line 1277, in Execute
    cur._Execute(cli_mode=True, kwargs=kwargs)
  File "/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init_   _.py", line 940, in _Execute
    cli_mode=cli_mode)
  File "/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init_   _.py", line 672, in Run
    result = command_instance.Run(args)
  File "/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/excepti   ons.py", line 84, in TryFunc
    return func(*args, **kwargs)
  File "/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/sdktools/   auth/login.py", line 46, in Run
    launch_browser=args.launch_browser and not c_gce.Metadata().connected)
  File "/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/core/credentials   /store.py", line 282, in AcquireFromWebFlow
    cred = flow.Run(webflow, launch_browser=launch_browser)
  File "/home/test/google-cloud-sdk/bin/../lib/google/cloud/sdk/core/credentials   /flow.py", line 120, in Run
    httpd.handle_request()
  File "/usr/lib/python2.7/SocketServer.py", line 265, in handle_request
    fd_sets = select.select([self], [], [], timeout)
KeyboardInterrupt

Original comment by sxw...@gmail.com on 7 Jan 2014 at 11:33

GoogleCodeExporter commented 9 years ago
The oauth2 flow is a browser based web flow.  It looks like you are running 
this over ssh, and so there is no browser for it to open.  Instead, it seems 
like it is opening the web page in a text based browser.

When running login over ssh, use the --no-launch-browser flag which will give 
you a URL to open on a machine that has a browser.

Original comment by markp...@google.com on 7 Jan 2014 at 11:40

GoogleCodeExporter commented 9 years ago
Thanks for your response. I followed the instruction from this link:

https://developers.google.com/compute/docs/gcutil/

and the attached file. It looked like it is invoked from a Linux machine. How 
do I run from a web browser this command?

Original comment by sxw...@gmail.com on 8 Jan 2014 at 1:52

Attachments:

GoogleCodeExporter commented 9 years ago
You cannot typically open a web browser on a machine that you are connection to 
over ssh.  If you look directly below the example screenshot you sent, there is 
an example of how to use: 

gcloud auth login --no-launch-browser

when you do not have an browser available.

Original comment by markp...@google.com on 8 Jan 2014 at 3:50