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

Using CLI tools to request service with mkcert certs does not work (macOS) #341

Closed
back-2-95 opened this issue Feb 13, 2021 · 5 comments
Closed

Comments

@back-2-95
Copy link

back-2-95 commented Feb 13, 2021

E.g. if I make requests to my local container (Traefik + mkcert generated certs) with Httpie. Note that these certs work when accessing the site with Chrome or Firefox. I use macOS Big Sur atm.

$ http --headers https://portainer.docker.sh

Will end up with following error:

http: error: SSLError: HTTPSConnectionPool(host='portainer.docker.sh', 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:1123)'))) while doing a GET request to URL: https://portainer.docker.sh/

Original issue from our tool:
druidfi/stonehenge#47

  • Is there some extra step I'm missing?
  • Or is this a known issue?
@fgm
Copy link

fgm commented Mar 3, 2021

Same problem with httpie on bare metal Big Sur, although curl works normally:

$ http -phb https://localhost:8443

http: error: SSLError: HTTPSConnectionPool(host='localhost', port=8443): 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:1123)'))) while doing a GET request to URL: https://localhost:8443/
$

But:

$ curl -I  https://localhost:8443
HTTP/2 200
content-type: text/plain; charset=utf-8
content-length: 34
date: Wed, 03 Mar 2021 08:42:33 GMT
$

@back-2-95
Copy link
Author

Related discussion on httpie httpie/cli#768

@back-2-95
Copy link
Author

And httpie/cli#480 (comment)

@back-2-95
Copy link
Author

So I would conclude that it's problem with a certain cli tool and not mkcert.

@g0t4
Copy link

g0t4 commented Nov 13, 2023

FYI this works for *nix:

export REQUESTS_CA_BUNDLE="$(mkcert -CAROOT)/rootCA.pem"
https localhost

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

3 participants