I want to upload a Python package to a secured (HTTPS) Artifactory server from my machine using Twine.
First, using the following:
twine upload --verbose \
--repository-url https://URL/artifactory/api/pypi/PATH \
--username XX \
--password XX \
dist/*
I get the following error:
requests.exceptions.SSLError: HTTPSConnectionPool(host='URL', port=443): Max retries exceeded with url: /artifactory/api/pypi/PATH (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
After a big of digging, I found this little solution. So I downloaded the cert.pem file and provided it to my upload command with:
--cert ../../bin/cert.pem
Which still gives me the following error:
certificate verify failed: unable to get local issuer certificate
How can I solve this issue correctly (I would like NOT TO disable SSL check).
Yuvarajan :
It appears to be an issue with the client in recognizing the certificate. Are you trying to execute the above mentioned task in a MacOS machine? If yes, installing Certificates.command should help resolving this issue.\nHow?\nGo to the Applications folder in the system, select the appropriate Python installation directory and double click on Certificates.command file.",
2022-12-20T08:34:14