hatch icon indicating copy to clipboard operation
hatch copied to clipboard

publish: allow disabling PyPI token keyring integration and inform user of its presence

Open gotmax23 opened this issue 1 year ago • 0 comments

By default, hatch publish prompts for a PyPI token and then unconditionally saves it to the system keyring:

https://github.com/pypa/hatch/blob/5352e4422636cf1238017a74f0c67d689ccee558/src/hatch/publish/auth.py#L111-L114

I already have my token in a password vault and prefer to paste it in every time; this is what I do when publishing with twine for my non-Hatch projects. Would it be possible to allow users to opt-out from the keyring integration and not save the token? In any case, hatch should inform the user (i.e., print out a log message) that it's saving the entered token into the keyring before doing so.

gotmax23 avatar Sep 16 '24 04:09 gotmax23