我想上传一个Python包到PyPI中,使用以下命令:无法上传到PyPI将用麻线
pip install -e .
python setup.py bdist_wheel --universal
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
我得到这个错误:
HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/
我已经也尝试下面的命令:
twine upload dist/*
twine upload --repository-url pypi dist/*
twine upload --repository-url https://upload.pypi.org/legacy dist/*
python setup.py bdist_wheel --universal upload
与位于我运行命令的相同目录.pypirc从该文件是:
[distutils]
index-servers =
pypi
pypitest
[pypitest]
repository: https://testpypi.python.org/pypi/
username: <username>
password: <password>
[pypi]
repository: https://upload.pypi.org/legacy/
username: <username>
password: <password>
但我仍然要求输入密码。 (也尝试过使用pypitest,在那里创建一个帐户后,但获得相同的错误)
我也试过做同样的,但与存储库行删除。
我试图上传所用的包名被占用,但它已被删除,现在 - https://pypi.python.org/pypi?name=&version=1.0.0&:action=display说,包没有找到
的用户名和密码,我用我都是使用相同的成功登录到https://pypi.python.org/pypi?%3Aaction=login_form
[无法将软件包上传到PyPI:410 Gone](https://stackoverflow.com/questions/45207128/failed-to-upload-packages-to-pypi-410-gone) – phd
删除'repository '〜/ .pypirc'中的URL并再次尝试'twine upload'。 – phd
@phd谢谢,但我已经试过了,正如我所说的“我也尝试过这样做,但删除了存储库行。”在我的问题 – ECH