bndr / pipreqs

pipreqs - Generate pip requirements.txt file based on imports of any project. Looking for maintainers to move this project forward.
Apache License 2.0
6.38k stars 388 forks source link

SSL Mismatch #227

Open pleappleappleap opened 3 years ago

pleappleappleap commented 3 years ago

I have a corporate proxy server which performs a MITM on SSL connections, including the one used by pipreqs. When using pip, I have to use --trusted-host on the command-line. There does not appear to be a way to do this in pipreqs. Thanks for reading.

devashish-gaikwad commented 3 years ago

I am also facing the same issue requests.exceptions.SSLError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/Flask/json (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

devashish-gaikwad commented 3 years ago

I'm currently developing a solution for this

diman82 commented 3 years ago

I'm currently developing a solution for this Any estimation for a solution?

In the meanwhile, you can try setting env variables REQUESTS_CA_BUNDLE for .pem or SSL_CERT_FILE for .crt : https://stackoverflow.com/questions/30405867/how-to-get-python-requests-to-trust-a-self-signed-ssl-certificate

abulgher commented 2 years ago

I can confirm that the solution of exporting the REQUESTS_CA_BUNDLE pointing to the local certification authority works, but it would be nice to have the possibility to either pass this option directly to pipreqs, or - even better - to have pipreqs using the same network configuration (proxy, ssl options, url index) directly from pip configuration.

maria-cane commented 1 year ago

I am also facing the same issue

Tornadocraver commented 6 months ago

Same issue here. However, setting the environment variable does not solve the problem in my case.