Improvements for clan secrets key generate.

I am not sure to understand what `extract_public_key` was for. It seems
like `age-keygen -y` will just work fine for a file like
`extract_public_key` is looking for. Unless someone intentionally made a
file with a comment like that without the private key in it.

Messages are moved to stdout rather being logged. It feels like the
output is meaningful in the first step users are going to take. Also
makes testing easier, as log messages are captured differently than
stdout. The call to add an user is changed to be easier to copy paste
and work whether PGP or age is in use.

A description for the command is added instead of help which does not
seem to be displayed.
This commit is contained in:
Louis Opter
2024-10-01 19:53:22 -07:00
committed by Mic92
parent 7999465d89
commit 103ad87bc9
2 changed files with 26 additions and 36 deletions

View File

@@ -180,6 +180,7 @@ def register_users_parser(parser: argparse.ArgumentParser) -> None:
"--pgp-key",
help=(
"public PGP encryption key of the user. "
# Use --fingerprint --fingerprint to get fingerprints for subkeys:
"Execute `gpg -k --fingerprint --fingerprint` and remove spaces to get it."
),
)