HTTPie give SSLError for normal sites
+0
−0
HTTPie complains about TLS certificates ever for sites I know are fine:
$ https wikipedia.org
https: error: SSLError: HTTPSConnectionPool(host='wikipedia.org', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) while doing a GET request to URL: https://wikipedia.org/
It opens fine in my browser, so what's the problem?
1 answer
+0
−0
Sometimes Python packages fail to use your system's CA certificates (what your browser uses). For HTTPie, this is actually tracked in https://github.com/httpie/cli/issues/1581
One solution is to pip install pip-system-certs
which will make Python use your system certificates instead. After this, https wikipedia.org
should work normally.
0 comment threads