pypa / packaging-problems

An issue tracker for the problems in packaging
152 stars 35 forks source link

Toruble in uploading package .Giving authentication failed even after giving API token. #541

Open venkatnarsaiah001 opened 3 years ago

venkatnarsaiah001 commented 3 years ago

OS version

windows 10

Python version

pyhon 3.6.2

Pip version

pip 20.1

Guide link

https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives

Problem description

I have build the packages and creaed account in testpypi and pypi . created API token in both . When i am trying to upload the packages it asked username and password as mentioned in the document but it is giving below error HTTPError: 403 Forbidden from https://test.pypi.org/legacy/ Invalid or non-existent authentication information. See https://test.pypi.org/help/#invalid-auth for more information.

can you help me. Thank you in advance

Error message

HTTPError: 403 Forbidden from https://test.pypi.org/legacy/
Invalid or non-existent authentication information. See https://test.pypi.org/help/#invalid-auth for more information.
bhrutledge commented 3 years ago

Can you add the output of python3 -m twine upload --verbose --repository testpypi dist/*?

Did you look at https://pypi.org/help/#invalid-auth? That offers some suggestions. For example, a common problem is pasting the token in the Windows command prompt.

HninPwint commented 3 years ago

I got the "Invalid or non-existent authentication information error yesterday when I copied and pasted the API token or password in testpypi environment regardless of the Copy-Paste mode was ON in the terminal properties.

Because a couple of weeks ago, copy-paste worked in my Window terminal.

The problem was solved when I manually entered the password ( Username / Password).

bhrutledge commented 3 years ago

@HninPwint Having to manually enter your password isn't ideal; it'd be better if you could copy and paste your token.

Did you look at https://pypi.org/help/#invalid-auth? What keys are you pressing to copy and paste?

Also, there's a lot of discussion on this issue, with workarounds, in https://github.com/pypa/twine/issues/671; maybe some of that might be helpful.