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
Traceback (most recent call last):
File "/home/runner/.local/bin/twine", line 8, in <module>
sys.exit(main())
File "/home/runner/.local/lib/python3.8/site-packages/twine/__main__.py", line 33, in main
error = cli.dispatch(sys.argv[1:])
File "/home/runner/.local/lib/python3.8/site-packages/twine/cli.py", line 123, in dispatch
return main(args.args)
File "/home/runner/.local/lib/python3.8/site-packages/twine/commands/upload.py", line 198, in main
return upload(upload_settings, parsed_args.dists)
File "/home/runner/.local/lib/python3.8/site-packages/twine/commands/upload.py", line 127, in upload
repository = upload_settings.create_repository()
File "/home/runner/.local/lib/python3.8/site-packages/twine/settings.py", line 329, in create_repository
self.username,
File "/home/runner/.local/lib/python3.8/site-packages/twine/settings.py", line 131, in username
return cast(Optional[str], self.auth.username)
File "/home/runner/.local/lib/python3.8/site-packages/twine/auth.py", line 34, in username
return utils.get_userpass_value(
File "/home/runner/.local/lib/python3.8/site-packages/twine/utils.py", line 248, in get_userpass_value
value = prompt_strategy()
File "/home/runner/.local/lib/python3.8/site-packages/twine/auth.py", line 85, in username_from_keyring_or_prompt
return self.prompt("username", input)
File "/home/runner/.local/lib/python3.8/site-packages/twine/auth.py", line 96, in prompt
return how(f"Enter your {what}: ")
EOFError: EOF when reading a line
Enter your username: failed to twine upload
Error: Process completed with exit code 1.
And I spent a lot of time focusing on the EOFError: EOF when reading a line part of the issue and I didn't really see the Enter your username:, especially because it was followed by failed to twine upload.
With the new change to enforcing token based credentials, I think it may be more common for users to forget to put --username __token__ when using a token as the password in a non-interactive session. So maybe raising a more clear ValueError indication: "A Username was not specified, please enter a valid username or rerun with --username token if using a token as a password or --username if using your username/password credentials"...
Maybe that's a bit too wordy, but something along those lines might be nice. (It might even be nicer to just have a --token <token> argument as an alias for --username __token__ --password <token>.
The text was updated successfully, but these errors were encountered:
This is simply a suggestion for a place where a better error message might improve UX.
It took me way too long to debug this issue, but in this recent CI run:
https://github.com/GERSL/pycold/runs/8263806866?check_suite_focus=true
I got an error:
And I spent a lot of time focusing on the
EOFError: EOF when reading a line
part of the issue and I didn't really see theEnter your username:
, especially because it was followed byfailed to twine upload
.With the new change to enforcing token based credentials, I think it may be more common for users to forget to put
--username __token__
when using a token as the password in a non-interactive session. So maybe raising a more clear ValueError indication: "A Username was not specified, please enter a valid username or rerun with --username token if using a token as a password or --username if using your username/password credentials"...Maybe that's a bit too wordy, but something along those lines might be nice. (It might even be nicer to just have a
--token <token>
argument as an alias for--username __token__ --password <token>
.The text was updated successfully, but these errors were encountered: