Gcloud auth login fails

3,950 views
Skip to first unread message

Shiladitya Chaudhury

unread,
May 26, 2014, 9:00:17 AM5/26/14
to google-c...@googlegroups.com
Hi everyone,

I was trying out the Google App engine trial today.
I am having problems with 
gcloud auth login.

When I type the above command, a browser window opens and after verifying my credentials, it says 

You are now authenticated with the Google Cloud SDK!


But, in the command line, where I typed the command, I get the following error. The only way I could solve this issue is to replace the cacert.txt file in D:\google-cloud-sdk\lib\httplib2 from my friend who had it working.I had tried a fresh download and it too did not work. Overall, not a pleasant first experience. Can anyone tell me why the cacert file which I downloaded was not working.



Traceback (most recent call last):
  File "D:\google-cloud-sdk\bin\..\./lib\googlecloudsdk\gcloud\gcloud.py", line
139, in <module>
    main()
  File "D:\google-cloud-sdk\bin\..\./lib\googlecloudsdk\gcloud\gcloud.py", line
135, in main
    _cli.Execute()
  File "D:\google-cloud-sdk\bin\..\./lib\googlecloudsdk\calliope\__init__.py", l
ine 1615, in Execute
    post_run_hooks=self.__post_run_hooks, kwargs=kwargs)
  File "D:\google-cloud-sdk\bin\..\./lib\googlecloudsdk\calliope\__init__.py", l
ine 1166, in _Execute
    pre_run_hooks=pre_run_hooks, post_run_hooks=post_run_hooks)
  File "D:\google-cloud-sdk\bin\..\./lib\googlecloudsdk\calliope\__init__.py", l
ine 885, in Run
    result = command_instance.Run(args)
  File "D:\google-cloud-sdk\bin\..\./lib\googlecloudsdk\calliope\exceptions.py",
 line 78, in TryFunc
    return func(*args, **kwargs)
  File "D:\google-cloud-sdk\lib\googlecloudsdk\gcloud\sdktools\auth\login.py", l
ine 61, in Run
    creds = self.DoWebFlow(args.launch_browser)
  File "D:\google-cloud-sdk\lib\googlecloudsdk\gcloud\sdktools\auth\login.py", l
ine 104, in DoWebFlow
    return c_store.AcquireFromWebFlow(launch_browser=launch_browser)
  File "D:\google-cloud-sdk\bin\..\./lib\googlecloudsdk\core\credentials\store.p
y", line 324, in AcquireFromWebFlow
    cred = flow.Run(webflow, launch_browser=launch_browser)
  File "D:\google-cloud-sdk\bin\..\./lib\googlecloudsdk\core\credentials\flow.py
", line 156, in Run
    credential = flow.step2_exchange(code, http=http)
  File "D:\google-cloud-sdk\bin\..\./lib\oauth2client\util.py", line 132, in pos
itional_wrapper
    return wrapped(*args, **kwargs)
  File "D:\google-cloud-sdk\bin\..\./lib\oauth2client\client.py", line 1283, in
step2_exchange
    headers=headers)
  File "D:\google-cloud-sdk\bin\..\./lib\httplib2\__init__.py", line 1586, in re
quest
    (response, content) = self._request(conn, authority, uri, request_uri, metho
d, body, headers, redirections, cachekey)
  File "D:\google-cloud-sdk\bin\..\./lib\httplib2\__init__.py", line 1333, in _r
equest
    (response, content) = self._conn_request(conn, request_uri, method, body, he
aders)
  File "D:\google-cloud-sdk\bin\..\./lib\httplib2\__init__.py", line 1255, in _c
onn_request
    conn.connect()
  File "D:\google-cloud-sdk\bin\..\./lib\httplib2\__init__.py", line 1044, in co
nnect
    raise SSLHandshakeError(e)
httplib2.SSLHandshakeError: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SS
L3_GET_SERVER_CERTIFICATE:certificate verify failed




John Asmuth

unread,
May 29, 2014, 3:28:17 PM5/29/14
to Shiladitya Chaudhury, google-c...@googlegroups.com
It looks like something is trying to intercept the traffic to Google's auth server. Are you doing this from an internet cafe?

John Asmuth

unread,
May 29, 2014, 3:30:37 PM5/29/14
to Shiladitya Chaudhury, Joe Gregorio, google-c...@googlegroups.com

Ah, I should have read the email more carefully before replying.

Joe, do you know what might be going wrong here?

Shiladitya Chaudhury

unread,
May 30, 2014, 1:26:06 AM5/30/14
to Joe Gregorio, John Asmuth, google-c...@googlegroups.com
Hi,

PFA the cacerts.txt file...Right now, it is not working with any file I have tried.
I am doing this from office...I will try it from home this weekend and let you know the results.


On Fri, May 30, 2014 at 1:04 AM, Joe Gregorio <jcgre...@google.com> wrote:
I don't know, can you attach both the cacerts.txt that works and the
cacerts.txt file that doesn't work?

  -joe
cacerts.txt

Holden Robbins

unread,
Oct 26, 2014, 3:28:40 PM10/26/14
to google-c...@googlegroups.com, jcgre...@google.com, jas...@google.com

I'm seeing the same issue today, trying to find a cacerts file that will work.  The attached file doesn't seem to work.  I'm on OS X python 2.7, if that matters.

Holden Robbins

unread,
Oct 26, 2014, 3:39:35 PM10/26/14
to google-c...@googlegroups.com, jcgre...@google.com, jas...@google.com

Never mind, I was able to replace the cacerts.txt file in /Users/h/google-cloud-sdk/lib/httplib2 with the file you attached, and it worked!

After spinning in circles for a good few hours ... Many Thanks to you Shiladitya!

Luke Stone, Google Cloud Support

unread,
Feb 25, 2015, 1:39:51 AM2/25/15
to google-c...@googlegroups.com
I had this problem too and fixed it by upgrading to Python 2.7.9.

Justin Forder

unread,
Aug 1, 2015, 12:20:12 PM8/1/15
to google-cloud-sdk
I ran into this problem with a new install of gcloud on my MacBook Air, which runs OS 10.9.5.

Changing the cacerts.txt in ~/google-cloud-sdk/lib/httplib2 to a later one from elsewhere in the gcloud libraries, or to the one attached earlier in this thread, didn't help (but did change the error message to "SSLHandshakeError: [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm", so it was clear that the cacerts.txt file was being used).

I had been running the Enthought Python Distribution (32-bit Python 2.7.3), but took it off my PATH. The Apple Python version was 2.7.5, and this is the one I tried different cacerts.txt files with, and still had problems.

I also had python27 installed using MacPorts - this was version 2.7.10, in /opt/local/bin/python2.7 (a symlink to /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7). Making this the default version of Python (by making another copy of the symlink named 'python' in the same directory) solved the problem. There must be a lot of Mac users running 10.9.5 or earlier - I think you should treat this as a bug.
Reply all
Reply to author
Forward
0 new messages