'Does Poetry have an equivalent for the flag "--trusted-host" that is available on Pip?

I wish to start using poetry on some projects at work, where I am stuck behind corporate filters that sometimes interfere with certs.

If I use pip, I can ignore SSL errors by doing something like the below:

$ pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org <package_name>

Does something like this exist for poetry, be it a command line argument or configuration values to be put into the lock file?



Solution 1:[1]

If you have the certificate of the root CA that is being used by your corporate firewall to inject its "man-in-the-middle attack", you can configure a particular repository to accept that root CA in pyproject.toml:

poetry config certificates.foo.cert /path/to/ca.pem

You can accomplish the same thing on a more global level by adding your corporate firewall's root CA certificate to the trusted root CA list for openSSL, so that most tools will just trust anything signed by your corporate firewall. You've probably already done the equivalent for your browser, which maintains its own trust list. The exact way to do that varies by operating system, but here are some instructions for Ubuntu https://ubuntu.com/server/docs/security-trust-store.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sam