-
Notifications
You must be signed in to change notification settings - Fork 3.7k
macOS system certs don't seem to be used; getting: certificate verify failed: unable to get local issuer certificate #1622
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
Comments
Just adding here that request also seems to work fine:
|
So I found this:
I'm wondering if httpie is actually not using certifi (while requests is)
So my theory is:
Since this location is empty, httpie fails. But httpie does install certifi has a dependency so why is it not using it?
|
As a workaround I will set env > REQUESTS_CA_BUNDLE=/etc/ssl/cert.pem (I prefer to use the system one its usually up to date), ofc I could set to certifi dir but I do believe there is a bug here. |
Found the issue, it was when we started to work around a previous issue with requests lib: https://github.com/httpie/cli/blob/master/httpie/compat.py#L104 But it seems now this fails on macOS because it doesnt seem to include any certs in the default python dir: This should probably be symlinked to the system one but its just empty |
Similar issue for me, but |
Checklist
Minimal reproduction code and steps
Current result
I get "certificate verify failed: unable to get local issuer certificate"
Expected result
Expect the same as bellow but without need to use "--verify=/etc/ssl/cert.pem "
Debug output
Please re-run the command with
--debug
, then copy the entire command & output and paste both below:Additional information, screenshots, or code examples
I haven't used http in terminal in a while so I'm not sure when this started, httpie desktop has covered most my needs :) but sometimes I do need to run requests in the terminal and I prefer htttpie to curl, but seems like its using something else other that OS ca bundle for certs.
Curl and wget just work, this only happens with httpie, there a previous ticket that suggests this comes from requests or certifi, but I'l just using the version httpie installs, I started with a clean pip env and this is all installed as deps of httpie (also that other issue was apparently fixed long ago):
On that note, I was thinking it might be getting the bundle from certifi so I tried:
Also seems to work, so not quite sure what httpie actually uses as cert bundle, it doesn't seem to be either the on included in macOS installation or certifi.
The text was updated successfully, but these errors were encountered: