Add support for key::... public key format

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-01-02 13:28:33 +01:00
parent 4f582f77cc
commit 651684ef56
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ git committerconfig
### Commit ### Commit
signingkey=$(git config user.signingkey) signingkey=$(git config user.signingkey)
if [[ $signingkey =~ ^(ssh|ecdsa) ]]; then if [[ $signingkey =~ ^(ssh|ecdsa|key::) ]]; then
step "Loading ssh key into agent..." step "Loading ssh key into agent..."
vault-sshadd $(cut -d ' ' -f 3 <<<"${signingkey}") vault-sshadd $(cut -d ' ' -f 3 <<<"${signingkey}")
else else

View file

@ -42,7 +42,7 @@ def main():
if 'signingkey' in combi and combi['signingkey'] != '': if 'signingkey' in combi and combi['signingkey'] != '':
set_local_config('user.signingkey', combi['signingkey']) set_local_config('user.signingkey', combi['signingkey'])
set_local_config('gpg.format', 'ssh' if re.search( 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: if 'commit-opts' in combi:
set_local_config('commit.cliopts', combi['commit-opts']) set_local_config('commit.cliopts', combi['commit-opts'])