问题
I would like to upload a package to Pypi so I have created an account and tried to follow the manual.
- Account:
It looks I cannot create projects from pypi.org directly:
I installed
twineand I did$ python3 -m twine upload dist/*
This time I have the following error:
HTTPError: 403 Client Error: Invalid or non-existent
authentication information. for url: https://upload.pypi.org/legacy/
Perhaps this is related to my Two Factor Authentication. I am also curious about he legacy word used there.
If I disable the Two Factor Authentication it works...
回答1:
From https://pypi.org/help/#twofa:
Users who have chosen to set up two factor authentication will be asked to provide their second method of identity verification during the log in process. This only affects logging in via a web browser, and not (yet) package uploads.
You can use API tokens instead.
来源:https://stackoverflow.com/questions/57506394/how-to-upload-package-to-pypi-with-two-factor-enabled