Luckily you can!
For packages on pypi.org, poetry has a source for this already. Run
poetry config certificates.PyPI.cert false
if you don't have/need/care about a pem
file.
(Notice the capitalization of PyPI)
This will allow any package from pypi without certification, of course in place of false
you can put the path of a pem
file like this:
poetry config certificates.PyPI.cert /path/to/ca.pem
to do the same for pythonhosted.org, you'll have to add the source manually like this:
poetry source add pythonhosted https://files.pythonhosted.org
Here, pythonhosted
was the name I chose, but this doesn't matter (so long as you don't overwrite anything if the name already exists, obviously).
Then, we point the cert for this source to what we want like we did above:
poetry config certificates.pythonhosted.org false
Run all of these at once with:
poetry config certificates.PyPI.cert false && poetry source add pythonhosted https://files.pythonhosted.org && poetry config certificates.pythonhosted.org false
and you should now be able to install packages with poetry without blockers.