Skip to content

Token not working, always causing 403 #11217

Closed
@novitae

Description

@novitae

Describe the bug

PyPI API Token not working for me

Expected behavior

GitHub action Upload Python Package authentication fails with the token I generates for it (403).

To Reproduce

Create a repo with some python things. Upload it to PyPI with twine from your terminal with username and password. It should work. Put this repo on github, change few things, update the version in setup.py. In actions, add the Upload Python Package action. Create an api token for it. Add it in the secrets under the name of PYPI_API_TOKEN. Create a new tag, it should start upload this tag to PyPI, but for me it fails.

Long story short, follow what's written here with the Upload Python Package GitHub action.

Also something weird, even if I deleted all my tokens, when I create new one, it tells me API token name already in use, but when I go back to my profile I see it registered ...

Additional context

I asked here pypi/support#1623 a 2FA recovery, now it is done. But could this be the source of the problem ? Right now I don't have 2FA activated, and since I saw we need a verified email to generate token (mine is verified), I'm asking myself if no having 2FA can influence this, like not generating valid tokens. Just supposition, I might be completely off-topic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions