nutrx
nutrx

Reputation: 126

PyPI package testing: 403 Forbidden from https://test.pypi.org/legacy/

I am just trying to create a python package on testPyPI for some testing (using twine), following this official guide. I am using a token, which succeeded exactly one time (username __token__, password is the token itself). Then I made a change and wanted to repeat that process, it doesn't work anymore.

related post

This seems to be a common issue, however I couldn't fix it so far. I'm on Windows 10, this is what I tried...

And I'm running out of ideas. Any clue?

Upvotes: 4

Views: 956

Answers (1)

marcel h
marcel h

Reputation: 788

I was struggling with the same issue. The tutorial OP referred to is, in my opinion, not explicit enough, because there tend to be two ways, which can easily be mixed (as I was doing, however, I am a newbie following the tutorial for a reason ;) ).

Solution: Assuming a /home/.pypirc file is created you can either

  1. use credentials (i.e, use username and password for logging into the website):
[testpypi]
  username = <your username>
  password = <your password>
  1. or use the API token created on the website:
[testpypi]
  username = __token__
  password = pypi-<Rest of token>

Hope that helps others following the tutorial.

Upvotes: 1

Related Questions