hatch: Error: API Token or Trusted Publisher must be used to upload in place of password
A few months ago, hatch publish worked fine for me.
Now, I get the error:
jan-hendrik@Jan-Hendriks-MacBook-Air ipymafs % hatch publish
dist/ipymafs-0.1.2.tar.gz ... failed
Error uploading to repository: https://upload.pypi.org/legacy/ - Client error '401 User kolibril13 has two factor auth enabled,
an API Token or Trusted Publisher must be used to upload in place of password.' for url 'https://upload.pypi.org/legacy/'
For more information check: https://httpstatuses.com/401
I’ve already generated a token on pypi that looks like thispypi-AgEIdffx*********************************************************
How can I feed this token to hatch, so that I can publish my packages?
I’m grateful for any help!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 43 (20 by maintainers)
Recommend
fzfwhen searching for files https://github.com/junegunn/fzfAlso consider if you can just do
hatch --versionThenpython -m venv hatch_test && source hatch_test/bin/activateThe modify files in the venv there faster for your debuggingI’ve now tried to use a few flags of the publish command to set both the username and authentication info, but that all did not work:
-> ❌
-> ❌
-> ❌
any further ideas how I can update the pypi token? Any suggestions are much appreciated!