GAE SDK 1.7.4 and InvalidCertificateException

后端 未结 4 1943
南方客
南方客 2020-12-08 02:53

Recently, I upgraded my GAE SDK to ver. 1.7.4 and it started to throw \'InvalidCertificateException\' when I try to run development server. I searched about this error and s

相关标签:
4条回答
  • 2020-12-08 03:27

    Compact answer, current as of January 2014 (just survived an SDK update):

    rm file /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/cacerts/urlfetch_cacerts.txt
    

    or ...

    cd /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/cacerts/
    rm urlfetch_cacerts.txt
    

    and everything runs smoothly again.

    And you better delete "cacerts.txt" (in the same directory), too. Otherwise the sdk command line tools will throw exceptions, too :(

    0 讨论(0)
  • 2020-12-08 03:30

    FYI: if you are on a Mac running Mavericks, this error might be due to using python 2.7.6 or lower, which has a known bug that causes this error.

    For example, you would get a similar error by simply trying to get any SSL page:

    pip install requests
    python
    
    >>> import requests
    >>> requests.get("https://github.com")
    

    The above would yield the same SSL cert errors. In this case, none of the gcloud (Google cloud SDK) commands work.

    Upgrade to python 2.7.8 (or newer 2.7.X) to solve the problem (worked for me).

    0 讨论(0)
  • 2020-12-08 03:40

    Upgrading Python from 2.7.3 to 2.7.9 fixed it for me. I'm on Mac OS X 10.6.8 (Snow Leopard).

    0 讨论(0)
  • 2020-12-08 03:43

    Quick workaround that I found: delete the file google_appengine/lib/cacerts/cacerts.txt from your installed SDK.

    Starting from the GoogleAppEngineLauncher:

    GoogleAppEngineLauncher/Contents/Resources/GoogleAppEngineDefault.bundle/Content‌​s/Resources/google_appengine/lib/cacerts/cacerts.txt

    EDIT #

    as of google app engine SDK 1.8.1 this file as been renamed to urlfetch_cacerts.txt. Still in the same directory and removing it still fixes the problem.

    – @Harrison

    0 讨论(0)
提交回复
热议问题