Can't upload to PyPi with Twine

EDIT: if you're using Windows, check my other suggestion

It looks like some sort of error with the account I was using. The following steps fixed it for me:

  1. Create a new account
  2. Upload the package with the new account with twine upload dist/*
  3. Add the previous account (that you originally wanted to upload with) to the package as an owner

Also be aware that the test pypi server --repository-url https://test.pypi.org/legacy/, requires a different account to be created from the live server --repository-url https://upload.pypi.org/legacy/


I hit this problem following the pypi instructions for creating a new package. That tutorial takes you through uploading to their test server (--repository-url https://test.pypi.org/legacy/), for which I always get a 403.

For their actual uploads server, (--repository-url https://upload.pypi.org/legacy/) my credentials work fine. So clearly there's some variation in credentials between their test and live servers, which could be worth considering if you're bumping against this problem.


When we enter the password, the password is not wrong, and I think it's a bug.

I use -u for the username and -p for the password directly without using the fields provided by the console(the default).

I try to run this in the command: twine upload -u YOUR-USERNAME -p YOUR-PASSWORD --repository-url https://test.pypi.org/legacy/ dist / *

I run that command on windows: command-picture

It works for me. Hope this will help

Tags:

Python

Pypi

Twine