I am trying to register a package on pyPI. After creating a .pypirc that looks like
[distutils] # this tells distutils what package indexes you can push to
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: "amfarrell"
password: "I dont post my passphrase publicly"
[pypitest]
repository: https://testpypi.python.org/pypi
username: "amfarrell"
password: "I dont post my passphrase publicly"
I run python setup.py register -r pypitest
and I get an error that ends in "Server response (401): You must login to access this feature". How do I login to pypi from the terminal?
I also get the error "Upload failed (401): You must be identified to edit package information" when I run python setup.py sdist upload
.
I had this problem, and the issue was that I had no account at the PyPI test server - they use a different user DB so you need to sign up there as well as the main server.
The problem is the quote marks around the passphrase in ~/.pypirc. The easiest way to solve this is to simply mv ~/.pypirc ~/dot-pypirc
and run python setup.py register
.
Judging by a few trials,
Server response (401): You must login to access this feature
indicates authentication failure. This happens when either:
Quotes are treated as part of the password/username, so, as you've noted, you must remove them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With