jayfk / statuspage

A statuspage generator that lets you host your statuspage for free on Github.
https://corestatus.io
MIT License
3.89k stars 183 forks source link

certificate verify failed #6

Open rc125 opened 8 years ago

rc125 commented 8 years ago

When try to create a new status page, i get this message:

Traceback (most recent call last):
  File "<string>", line 233, in <module>
  File "site-packages/click/core.py", line 716, in __call__
  File "site-packages/click/core.py", line 696, in main
  File "site-packages/click/core.py", line 1060, in invoke
  File "site-packages/click/core.py", line 889, in invoke
  File "site-packages/click/core.py", line 534, in invoke
  File "<string>", line 47, in create
  File "<string>", line 155, in run_create
  File "github/AuthenticatedUser.py", line 542, in create_repo
  File "github/Requester.py", line 171, in requestJsonAndCheck
  File "github/Requester.py", line 212, in requestJson
  File "github/Requester.py", line 251, in __requestEncode
  File "github/Requester.py", line 275, in __requestRaw
  File "http/client.py", line 1083, in request
  File "http/client.py", line 1128, in _send_request
  File "http/client.py", line 1079, in endheaders
  File "http/client.py", line 911, in _send_output
  File "http/client.py", line 854, in send
  File "http/client.py", line 1237, in connect
  File "ssl.py", line 376, in wrap_socket
  File "ssl.py", line 747, in __init__
  File "ssl.py", line 983, in do_handshake
  File "ssl.py", line 628, in do_handshake
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646)
statuspage returned -1
jayfk commented 8 years ago

Are you using the Mac OS X or the Linux binary?

rc125 commented 8 years ago

OS X 10.11.3 (15D21)

taeukkang commented 8 years ago

Same error happens to me.

jayfk commented 8 years ago

That's probably an incompatibility between python and openssl http://stackoverflow.com/questions/27804710/python-urllib2-ssl-error/27826829#27826829

ipv1337 commented 8 years ago

I get the same on Fedora 23

leovarmak commented 8 years ago

Man, I get the same.

jakirkham commented 8 years ago

This is an easy fix. Set the environment variable SSL_CERT_FILE to point to your cert.pem or similar certificate file. These are not bundled with the binary (nor should they be!).

jakirkham commented 8 years ago

Honestly, @jayfk IMHO this is a README fix.

Bundling the certs with the binary seems like a bad choice IMHO. It is not done currently so we are doing the right thing now. If we just specify that this environment variable needs to be set, one should be fine.

Alternatively, we could search multiple paths setting that variable after checking a bunch. This is what libcloud does as shown by this code. We just can't use certifi as that amounts to bundling the certs too.