unioslo / harborapi

Python async client for the Harbor REST API v2.0.
https://unioslo.github.io/harborapi/
MIT License
28 stars 5 forks source link

Disable ssl #42

Closed nikolasj closed 1 year ago

nikolasj commented 1 year ago

Hello. Is it possible to disable certificate verification?

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)

in requests package it is verify=False requests.get(policy_url, headers=HEADERS, auth=(username, password), verify=False)

pederhan commented 1 year ago

Yeah, I can add that, although I am using httpx, which might have a slightly different implementation.

I'll probably just expose all httpx.AsyncClient kwargs in the HarborAsyncClient in the constructor at some point, but I'll prioritize adding verify ASAP.

nikolasj commented 1 year ago

Thank you. A very necessary feature. I would like to try to use your lib

pederhan commented 1 year ago

I've pushed a new version (0.14.1), try it out and see if it works for you.

nikolasj commented 1 year ago

It works for me. Thank you!