6

I've followed Peter Down's instruction on pushing a package to PyPI on http://peterdowns.com/posts/first-time-with-pypi.html

I have an account on PyPI Live and PyPI Test, I could log-in and the accounts were verified through the email.

But when I tried to run this within my repo:

python setup.py register -r pypitest

I get:

running register
running check
Registering [package_name] to https://testpypi.python.org/pypi
Server response (500): <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>

Any idea what went wrong? I've my ~/.pypirc file written accordingly to my username and passwords too.

How can this be resolved such that I can register the package on PyPI?

alvas
  • 115,346
  • 109
  • 446
  • 738
  • Found the solution, didn't like it. https://gist.github.com/alvations/14880b8b961d9c5c213cdfacb602ab34 – alvas Jan 18 '17 at 10:00
  • Do you have your certificate trust store in order with the root and intermediate certificates? I recently had this problem with a java web service client. – Iofacture Jan 31 '17 at 22:26
  • I don't think that's the problem with PyPI. And the PyPI servers are not maintained by me ;P – alvas Jan 31 '17 at 23:17
  • I was implying that perhaps the client does not have a complete SSL certificate chain in the trust store - this happened to me and it was very unexpected, yet true. This tends to not be a problem on windows as it keeps its truststore updated, but with java and many other languages surprises do occur. Can you turn on SSL tracing in your python interpreter? – Iofacture Jan 31 '17 at 23:29
  • I think it's too late. Now the error won't occur unless I am using a new account on PyPI. I will try to reproduce it tomorrow when it's the weekend with a new account =) – alvas Feb 02 '17 at 21:35
  • can you share code? – Aqdas Feb 07 '17 at 10:34
  • 3
    If you are using Python 3.6, you should have a look a this one http://stackoverflow.com/questions/42098126/mac-osx-python-ssl-sslerror-ssl-certificate-verify-failed-certificate-verify – P. Ekouaghe Mar 14 '17 at 23:08
  • In my case (using Conda and Python 3.5.1), the 500 response error disappeared after doing a `conda install ca-certificates` – Pablo R. Mier Aug 01 '17 at 08:21

0 Answers0