Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) #589

Closed
hsluoyz opened this issue Jul 7, 2017 · 3 comments

Comments

@hsluoyz
Copy link

hsluoyz commented Jul 7, 2017

Get SSL error for the example in README.

C:\Python27\python.exe J:\github_repos\aaa\aaa.py
Traceback (most recent call last):
  File "J:\github_repos\aaa\aaa.py", line 7, in <module>
    for repo in g.get_user().get_repos():
  File "C:\Python27\lib\site-packages\github\PaginatedList.py", line 49, in __iter__
    newElements = self._grow()
  File "C:\Python27\lib\site-packages\github\PaginatedList.py", line 61, in _grow
    newElements = self._fetchNextPage()
  File "C:\Python27\lib\site-packages\github\PaginatedList.py", line 163, in _fetchNextPage
    headers=self.__headers
  File "C:\Python27\lib\site-packages\github\Requester.py", line 172, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
  File "C:\Python27\lib\site-packages\github\Requester.py", line 213, in requestJson
    return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
  File "C:\Python27\lib\site-packages\github\Requester.py", line 252, in __requestEncode
    status, responseHeaders, output = self.__requestRaw(cnx, verb, url, requestHeaders, encoded_input)
  File "C:\Python27\lib\site-packages\github\Requester.py", line 277, in __requestRaw
    requestHeaders
  File "C:\Python27\lib\httplib.py", line 1042, in request
    self._send_request(method, url, body, headers)
  File "C:\Python27\lib\httplib.py", line 1082, in _send_request
    self.endheaders(body)
  File "C:\Python27\lib\httplib.py", line 1038, in endheaders
    self._send_output(message_body)
  File "C:\Python27\lib\httplib.py", line 882, in _send_output
    self.send(msg)
  File "C:\Python27\lib\httplib.py", line 844, in send
    self.connect()
  File "C:\Python27\lib\httplib.py", line 1263, in connect
    server_hostname=server_hostname)
  File "C:\Python27\lib\ssl.py", line 363, in wrap_socket
    _context=self)
  File "C:\Python27\lib\ssl.py", line 611, in __init__
    self.do_handshake()
  File "C:\Python27\lib\ssl.py", line 840, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)

Process finished with exit code 1
@digitaldavenyc
Copy link

+1

@luiscruz
Copy link

luiscruz commented Sep 4, 2017

+1

Any update?

@luiscruz
Copy link

luiscruz commented Sep 4, 2017

Problem solved with the suggestion from here:
https://stackoverflow.com/questions/41691327/ssl-sslerror-ssl-certificate-verify-failed-certificate-verify-failed-ssl-c/41692664

Did this:

cd /Applications/Python\ 3.6/
./Install\ Certificates.command

Edit: Now I see that this issue happens while using python27. My solution is for python36 devs running MacOSX. Since my error was essentially the same, perhaps something similar can fix the problem. Good luck!

@sfdye sfdye closed this as completed Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants