Pygithub: ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] ์ธ์ฆ์„œ ํ™•์ธ ์‹คํŒจ(_ssl.c:661)

์— ๋งŒ๋“  2017๋…„ 07์›” 07์ผ  ยท  3์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: PyGithub/PyGithub

README์˜ ์˜ˆ์ œ์— ๋Œ€ํ•œ SSL ์˜ค๋ฅ˜๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.

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

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

์—ฌ๊ธฐ์—์„œ ์ œ์•ˆํ•œ ๋ฌธ์ œ ํ•ด๊ฒฐ:
https://stackoverflow.com/questions/41691327/ssl-sslerror-ssl-certificate-verify-failed-certificate-verify-failed-ssl-c/41692664

์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

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

ํŽธ์ง‘: ์ด์ œ ์ด ๋ฌธ์ œ๊ฐ€ python27์„ ์‚ฌ์šฉํ•˜๋Š” ๋™์•ˆ ๋ฐœ์ƒํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•˜์Šต๋‹ˆ๋‹ค. ๋‚ด ์†”๋ฃจ์…˜์€ MacOSX๋ฅผ ์‹คํ–‰ํ•˜๋Š” python36 ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋‚ด ์˜ค๋ฅ˜๋Š” ๋ณธ์งˆ์ ์œผ๋กœ ๋™์ผํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋น„์Šทํ•œ ๊ฒƒ์œผ๋กœ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ–‰์šด์„ ๋น•๋‹ˆ๋‹ค!

๋ชจ๋“  3 ๋Œ“๊ธ€

+1

+1

๋ชจ๋“  ์—…๋ฐ์ดํŠธ?

์—ฌ๊ธฐ์—์„œ ์ œ์•ˆํ•œ ๋ฌธ์ œ ํ•ด๊ฒฐ:
https://stackoverflow.com/questions/41691327/ssl-sslerror-ssl-certificate-verify-failed-certificate-verify-failed-ssl-c/41692664

์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

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

ํŽธ์ง‘: ์ด์ œ ์ด ๋ฌธ์ œ๊ฐ€ python27์„ ์‚ฌ์šฉํ•˜๋Š” ๋™์•ˆ ๋ฐœ์ƒํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•˜์Šต๋‹ˆ๋‹ค. ๋‚ด ์†”๋ฃจ์…˜์€ MacOSX๋ฅผ ์‹คํ–‰ํ•˜๋Š” python36 ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋‚ด ์˜ค๋ฅ˜๋Š” ๋ณธ์งˆ์ ์œผ๋กœ ๋™์ผํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋น„์Šทํ•œ ๊ฒƒ์œผ๋กœ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ–‰์šด์„ ๋น•๋‹ˆ๋‹ค!

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰