"setup.py上传"失败,并显示“上传失败(401):必须标识您才能编辑程序包信息"; [英] "setup.py upload" is failing with "Upload failed (401): You must be identified to edit package information"

查看:87
本文介绍了"setup.py上传"失败,并显示“上传失败(401):必须标识您才能编辑程序包信息";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

跑步时..

python setup.py sdist register upload

..我得到以下输出:

..I get the following output:

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已经包含登录详细信息,但它仍提示您保存登录详细信息.然后,它无法上传我拥有的软件包的文件,并且无法完全写入.

It's prompting to save the login details, despite ~/.pypirc already containing this. It then fails to upload files for a package I own, and have full write-access to.

推荐答案

刚刚找到

Just found this page, which solves the issue:

我还注意到,虽然它要求我保存登录信息,但每次我都点击Y时,它仍然要求我提供用户名和密码.原来,它错误地保存了信息,如下所示:

I also noticed that while it was asking me to save my login information, and I hit Y everytime, it still asked me for the username and password. It turned out that it was saving the information incorrectly as follows:

[pypi]
username:dcramer
password:*******

对此进行解决可以解决问题:

Changing it out to this solved the problems:

[server-login]
username:dcramer
password:********

以上内容进入了 .pypirc文件用户的主目录.

The above content goes into the .pypirc file in the user's home directory.

U.我认为这是尝试分发的好时机.

Ugh.. I think this may be a good time to give distribute a try..

这篇关于"setup.py上传"失败,并显示“上传失败(401):必须标识您才能编辑程序包信息";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆