1
votes

I am trying to upload my Python package for the first time. But, I am getting this error:

HTTPError: 403 Client Error: You are not allowed to upload to 'test'. for url: https://upload.pypi.org/legacy/

What are the correct steps to upload a Python package?

My ~/.pypirc file contents:

[pypi]
username = my_username
password = my_password
1

1 Answers

0
votes

Here is a setup that worked for me

[distutils] # this tells distutils what package indexes you can push to
index-servers =
    pypi
    pypitest

[pypi]
repository: https://pypi.python.org/pypi
username: MyUsername
password: MyPassword

[pypitest]
repository: https://testpypi.python.org/pypi
username: MyUsername
password: MyPassword

It may be outdated, though...