0
votes

I am in the process of trying out google sdk app engine. I could get the local app running on my laptop but having problems with the gcloud auth login.

When I type the gcloud auth login command, a new browser window opens and after verifying my credentails, 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 -

D:\appengine-try-java>gcloud auth login

Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhos
t%3A8085%2F&prompt=select_account&response_type=code&client_id=32555940559.apps.
googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.
admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbigquery+https%3A%2F%2Fwww.googl
eapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdevstorage.
full_control+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2
F%2Fwww.googleapis.com%2Fauth%2Fndev.cloudman+https%3A%2F%2Fwww.googleapis.com%2
Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsqlservice.admi
n+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fprediction+https%3A%2F%2Fwww.googlea
pis.com%2Fauth%2Fprojecthosting&access_type=offline


     Traceback (most recent call last):
     `enter code here`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

Because of this, I am unable to deploy my application on the google cloud.

After some search, I figured out it has got to do with the cacerts.txt file in D:\google-cloud-sdk\lib\httplib2. I replaced the cacerts.txt file from my colleague and it worked fine once but now I am getting the issue again.

Anypointers in resolving this will be really helpful

1
This doesn't really answer your question but you can access your instance using SSH directly developers.google.com/compute/docs/console#sshkeys - kakoma

1 Answers

1
votes

Upgrading to Python 2.7.9 fixed this for me. I'm on a Mac though and I don't know your Python version, so YMMV.

More details here:

GAE SDK 1.7.4 and InvalidCertificateException