From 651684ef5697cbe8e74a2768654ff76099915d09 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 2 Jan 2024 13:28:33 +0100 Subject: [PATCH] Add support for `key::...` public key format Signed-off-by: Knut Ahlers --- bin/git-c | 2 +- bin/git-committerconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/git-c b/bin/git-c index 0a13189..79520d0 100755 --- a/bin/git-c +++ b/bin/git-c @@ -11,7 +11,7 @@ git committerconfig ### Commit signingkey=$(git config user.signingkey) -if [[ $signingkey =~ ^(ssh|ecdsa) ]]; then +if [[ $signingkey =~ ^(ssh|ecdsa|key::) ]]; then step "Loading ssh key into agent..." vault-sshadd $(cut -d ' ' -f 3 <<<"${signingkey}") else diff --git a/bin/git-committerconfig b/bin/git-committerconfig index 77792ca..7bf83f2 100755 --- a/bin/git-committerconfig +++ b/bin/git-committerconfig @@ -42,7 +42,7 @@ def main(): if 'signingkey' in combi and combi['signingkey'] != '': set_local_config('user.signingkey', combi['signingkey']) set_local_config('gpg.format', 'ssh' if re.search( - r'^(?:ssh|ecdsa)', combi['signingkey']) else 'openpgp') + r'^(?:ssh|ecdsa|key::)', combi['signingkey']) else 'openpgp') if 'commit-opts' in combi: set_local_config('commit.cliopts', combi['commit-opts'])