Weird PyPI authentication behavior
I'm trying to upload my package to PyPI. It asks me to identify, I do, it gives an OK response (which doesn't happen unless the identification is right), but then it claims I didn't identify! Why?
[...]
removing 'build\bdist.win32\egg' (and everything under it)
running register
We need to know who you are, so please choose either:
1. use your existing login,
2. register as a new user,
3. have the server generate a new password for you (and email it to you), or
4. quit
Your selection [default 1]: 1
Username: coolRR
Password:
Server response (200): OK
running upload
Submitting dist\garlicsim-0.1.zip to http://pypi.python.org/pypi
Upload failed (401): You must be identified to edit package information
removing 'build' (and e开发者_运维技巧verything under it)
error: garlicsim-0.1: No such file or directory
You were using an old version of Python (and Distutils as a result). This bug was fixed in r68415 2009-01-09 by Tarek Ziade. Try to upload with any Python 2.x version released afterwards.
I've never encountered that myself, but some things to check:
- Make sure you can login to PyPI using your browser with the username and password.
- Check that ~/.pypirc has the correct contents. If it does not exist, try creating it.
- Check your setup.cfg file to make sure all the PyPI settings (if any) are correct.
- Try building your package as separate check before you run the commands to upload/register, then try python setup.py upload.
精彩评论