create clan: better info about existing sop keys
When creating a new clan, the key selection now looks like this: ``` Found existing admin keys on this machine: 1: type: AGE pubkey: age1xyz... source: /home/grmpf/.config/sops/age/keys.txt 2: type: PGP pubkey: abc... source: SOPS_PGP_FP Select keys to use (comma-separated list of numbers, or leave empty to select all): ``` This is achieved by adding a `source` attribute to `SopsKey`.
This commit is contained in:
@@ -50,7 +50,9 @@ def _select_keys_interactive(pub_keys: list[SopsKey]) -> list[SopsKey]:
|
||||
log.info("\nFound existing admin keys on this machine:")
|
||||
selected_keys: list[SopsKey] = []
|
||||
for i, key in enumerate(pub_keys):
|
||||
log.info(f"{i + 1}: {key}")
|
||||
log.info(
|
||||
f"{i + 1}: type: {key.key_type}\n pubkey: {key.pubkey}\n source: {key.source}"
|
||||
)
|
||||
while not selected_keys:
|
||||
choice = input(
|
||||
"Select keys to use (comma-separated list of numbers, or leave empty to select all): "
|
||||
|
||||
Reference in New Issue
Block a user