简体   繁体   中英

pypi uploading error: twine

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

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM