- 1 year ago
upload pypi error:HTTPError: 403 Client Error: Invalid or non-existent authentication information
The error message "HTTPError: 403 Client Error: Invalid or non-existent authentication information" suggests that the authentication information you provided for uploading to PyPI is either incorrect or missing. Here are a few steps to help you resolve the issue:
Verify your PyPI credentials: Double-check the username and password you are using for authentication. Make sure they are correct and correspond to a valid PyPI account with upload permissions. If you don't have an account, you'll need to create one.
Confirm your PyPI configuration: Ensure that your
~/.pypirc
file (on Unix-based systems) or%HOME%/_pypirc
file (on Windows) is properly configured with the correct PyPI repository URL and credentials. The file should have the following format:
csharp[distutils]
index-servers =
pypi
[pypi]
repository: https://upload.pypi.org/legacy/
username: your_username
password: your_password
Replace your_username
and your_password
with your PyPI account credentials.
Verify the command and arguments: Make sure you are running the correct command to upload your package to PyPI. The typical command is
twine upload dist/*
(if you are usingtwine
as the upload tool), but you may have slight variations depending on your specific setup.Retry the upload: If you are confident that your authentication information is correct and your PyPI configuration is properly set up, try uploading the package again. Sometimes, temporary issues or network glitches can cause authentication errors.
If the issue persists, you may want to consider reaching out to PyPI support or the community for further assistance. They can help troubleshoot specific issues related to PyPI authentication and provide more targeted guidance.