From f632463e8abb3bf6f8af2bf061a695af99647f19 Mon Sep 17 00:00:00 2001 From: Felix Moessbauer Date: Tue, 12 Mar 2024 16:14:00 +0100 Subject: [PATCH] ssh-add-key: tell from where the key is added Instead of only reporting that a key will be added, also include information how this key is passed (e.g. via file or env-var). Signed-off-by: Felix Moessbauer Signed-off-by: Jan Kiszka --- kas/libkas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kas/libkas.py b/kas/libkas.py index 74210b18..b40bb604 100644 --- a/kas/libkas.py +++ b/kas/libkas.py @@ -368,13 +368,13 @@ def ssh_setup_agent(envkeys=None): key_path = os.environ.get(envkey) if key_path: found = True - logging.info("adding SSH key") + logging.info(f"adding SSH key from file '{key_path}'") ssh_add_key_file(env, key_path) else: key = os.environ.get(envkey) if key: found = True - logging.info("adding SSH key") + logging.info("adding SSH key from env-var 'SSH_PRIVATE_KEY'") ssh_add_key(env, key) if found is not True: