· 1 min read

How to Fix Pypi Upload failed (403): Invalid or non-existent authentication information.

If you run into authentication failure when trying to upload packages

Submitting dist/<package name> to https://upload.pypi.org/legacy/
Upload failed (403): Invalid or non-existent authentication information.
error: Upload failed (403): Invalid or non-existent authentication information.

You can try adding a ~/.pypirc file your home directory with a [server-login] entry

[server-login]
repository: https://pypi.python.org/pypi
username: yourusernamehere
password: yourpasswordhere

The documentation on Python's site seems to be wrong and the error messages from the command line are not very helpful and somewhat misleading.

1 comment

  • Dishtidave

    How do I create .pypric file in windows(Do I have to create and save it as .pypric extension? it simply saves as txt file ) and where home directory meaning outside of my setup file ?

Leave a comment