I'm trying to add a new package using poetry add
, but it always comes with this error:
HTTPSConnectionPool(host='10.140.240.64', port=443): Max retries exceeded with url: /api/v4/projects/118/packages/pypi/files/47f05b39ebe470235b70724fb049985ea75fad6c1a5007ad3462f3d430da338b/tg_client-0.1.10-py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)')))
Who knows how to skip this verification?
Updated:
I try to add a package from private repository:
[[tool.poetry.source]]
name = "my_package"
url = "https://..."
secondary = true
Maybe that is why the solution poetry config certificates.my_package.cert false
doesn't work.
CodePudding user response:
https://python-poetry.org/docs/repositories/#certificates:
The value of certificates.< repository >.cert can be set to false if certificate verification is required to be skipped. This is useful for cases where a package source with self-signed certificates are used.
poetry config certificates.foo.cert false
CodePudding user response:
I found 2 working solutions:
- Use poetry version<=1.0.9;
- Extract certificate from the repository as described here then copy-paste it in the end of file with path
requests.utils.DEFAULT_CA_BUNDLE_PATH
(python).