Chengzhi
Chengzhi

Reputation: 2591

How to upload a PyPI package to Nexus3

I am new to Nexus3, I am following the instruction here to upload a PyPI package (python v2.7): https://books.sonatype.com/nexus-book/3.0/reference/pypi.html
However, I got the following message prevent me from uploading the the package.

HTTPError: 401 Client Error: Unauthorized for url

I did the following steps and not sure if I missed anything:
1. Setup blob and repo name in Nexus3
2. Copy the url to .pypirc
3. python setup.py sdist; twine upload -r nexus3 dist/[secure]-0.1.0.tar.gz

Please suggest, Thanks!

Upvotes: 5

Views: 8023

Answers (1)

Clintm
Clintm

Reputation: 4887

I had to add --config-file .pypirc to twine upload.

So

twine upload --config-file .pypirc -r nexus3 dist/[secure]-0.1.0.tar.gz

Upvotes: 3

Related Questions