如何将 PyPI 包上传到 Nexus3

Che*_*zhi 5 python nexus pypi nexus3 twine

我是 Nexus3 的新手,我按照此处的说明上传 PyPI 包(python v2.7):https://books.sonatype.com/nexus-book/3.0/reference/pypi.html
但是,我得到了以下消息阻止我上传包。

HTTPError:401 客户端错误:URL 未经授权

我执行了以下步骤,不确定是否错过了任何内容:
1. 在 Nexus3 中设置 blob 和存储库名称
2. 将 url 复制到 .pypirc
3.python setup.py sdist; twine upload -r nexus3 dist/[secure]-0.1.0.tar.gz

请推荐,谢谢!

Cli*_*ntm 3

我不得不添加--config-file .pypirctwine upload.

所以

twine upload --config-file .pypirc -r nexus3 dist/[secure]-0.1.0.tar.gz
Run Code Online (Sandbox Code Playgroud)