运行时..
python setup.py sdist register upload
..我得到以下输出:
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: example
Password: ...
Registering mypackage to http://pypi.python.org/pypi
Server response (200): OK
I can store your PyPI login so future submissions will be faster.
(the login will be stored in /Users/dbr/.pypirc)
Save your login (y/N)?y
running upload
Submitting dist/mypackage-1.2.1.tar.gz to http://pypi.python.org/pypi
Upload failed (401): You must be identified to edit package information
尽管
~/.pypirc
已经包含登录详细信息,但仍提示您保存登录详细信息。然后,它无法上传我拥有的程序包的文件,并且没有完全写入权限。 最佳答案
刚刚找到this page,它解决了这个问题:
以上内容将进入用户主目录中的 .pypirc
file。
gh ..我认为这是个尝试distribute的好时机。
关于python - “setup.py upload”因“Upload failed (401): You must be identified to edit package information”而失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/1569315/