You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running flit publish, I get the following output:
james@devone:~/git/pible/src$ flit publish
/usr/lib/python3/dist-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (2.2.1) or chardet (4.0.0) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "Found 78 files tracked in git I-flit.sdistBuilt sdist: dist/pible-0.1.tar.gz I-flit_core.sdistCopying package file(s) from /tmp/tmpkkeddu7v/pible-0.1/pible I-flit_core.wheelWriting metadata files I-flit_core.wheelWriting the record of files I-flit_core.wheelBuilt wheel: dist/pible-0.1-py2.py3-none-any.whl I-flit_core.wheelUsing repository at https://upload.pypi.org/legacy/ I-flit.uploadUploading dist/pible-0.1-py2.py3-none-any.whl... I-flit.uploadTraceback (most recent call last): File "/home/james/.local/bin/flit", line 8, in <module> sys.exit(main()) File "/home/james/.local/lib/python3.10/site-packages/flit/__init__.py", line 200, in main main(args.ini_file, repository, args.pypirc, formats=set(args.format or []), File "/home/james/.local/lib/python3.10/site-packages/flit/upload.py", line 277, in main do_upload(built.wheel.file, built.wheel.builder.metadata, pypirc_path, repo_name) File "/home/james/.local/lib/python3.10/site-packages/flit/upload.py", line 252, in do_upload upload_file(file, metadata, repo) File "/home/james/.local/lib/python3.10/site-packages/flit/upload.py", line 245, in upload_file resp.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self)requests.exceptions.HTTPError: 403 Client Error: Username/Password authentication is no longer supported. Migrate to API Tokens or Trusted Publishers instead. See https://pypi.org/help/#apitoken and https://pypi.org/help/#trusted-publishers for url: https://upload.pypi.org/legacy/
Flit doesn't ask me for a username and password. I've tried setting them (using __token__ and my token) using environment variables and a .pypirc, neither of them work.
Using twine upload dist/* asked me for my API token and then uploaded correctly.
Is there something I'm missing? Otherwise this seems like a serious bug.
The text was updated successfully, but these errors were encountered:
That's curious. I've definitely been able to upload successfully by setting the environment variables FLIT_USERNAME=__token__ FLIT_PASSWORD=pypi-... when uploading.
I've also done it with tokens saved in keyring - the username should be like pypi_token:project:<project> or pypi_token:user:<user>, replacing the last part with the relevant project name or username.
I want to make a better story around uploading with tokens, but the way I want to approach it requires an API to create tokens on PyPI, and that doesn't exist (pypi/warehouse#6396 ).
Would love to do anything I can to help troubleshoot this. Started fresh with a dummy project following the example on the README, and I'm still encountering this error or variations of it.
Running Pop OS 22.04, Python 3.10.12, Flit 3.9.0.
When running
flit publish
, I get the following output:Flit doesn't ask me for a username and password. I've tried setting them (using
__token__
and my token) using environment variables and a.pypirc
, neither of them work.Using
twine upload dist/*
asked me for my API token and then uploaded correctly.Is there something I'm missing? Otherwise this seems like a serious bug.
The text was updated successfully, but these errors were encountered: