I am trying to use Github API with httplib2. But when I making requests to it\'s endpoints, it gives me following error:
import httplib2
h = httplib2.Http()
UPD: The easiest way is to open GitHub in Firefox, View Page info -> Security -> View Certificate -> Details -> Export -> As PEM file. And also it is better to use requests.
From the information which Firefox gives about https connection, I found out that certificate for GitHub is "DigiCert High Assurance EV Root CA", which could be found here: http://curl.haxx.se/ca/cacert.pem
Text of certificate could be pasted to the httplib2.__path__ + '/cacerts.txt'
, or saved to separate file and than http connection should be created with:
h = httplib2.Http(ca_certs='/path/to/that/file')
Here is also useful post about this topic.