admin管理员组文章数量:1638817
正在自学Ninad Sathaye - Learning Python Application Development (2016, Packt Publishing - ebooks Account)。有一章节是将自己的代码上传到testPyPI。
在自己的用户目录下新建一个空白文件命名为.pypirc。在该文件中,我输入了自己的用户名和密码,假定用户名是abc,密码是123。一开始我输入的内容如下:
[distutils]
index-servers=
pypi
testpypi
[testpypi]
repository = https://test.pypi/legacy/
username= <abc>
password= <123>
在Anaconda的命令窗口中运行如下代码:
twine upload --repository testpypi dist/*
此时报错:
HTTPError: 403 Client Error: Invalid or non-existent authentication information. See https://test.pypi/help/#invalid-auth for details for url: https://test.pypi/legacy/
在网上搜索一番后,怀疑是我的用户名和密码输入有误,把用户名和密码中的<>去掉,问题得到解决。
[distutils]
index-servers=
pypi
testpypi
[testpypi]
repository = https://test.pypi/legacy/
username= abc
password= 123
参考资料:
[1] 发布你自己的轮子 - PyPI打包上传实践
本文标签: CLIENTHTTPErrortwineUploadauthentication
版权声明:本文标题:解决twine upload时HTTPError: 403 Client Error: Invalid or non-existent authentication information. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1729279867a1193932.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论