git: autoselect first -sk ssh key from agent for signing
This commit is contained in:
parent
6bc7f9e742
commit
eefe6eb9a1
2 changed files with 5 additions and 1 deletions
3
.config/git/signing-key.sh
Executable file
3
.config/git/signing-key.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
ssh-add -L | awk '/^sk-ssh/ { print "key::" $1 " " $2 }'
|
|
@ -10,7 +10,7 @@ compression = 3
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
useConfigOnly = true
|
useConfigOnly = true
|
||||||
signingKey = key::sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIFtd5SEEgKWzR6617GqxhSIi//4Afq7iRP0ny6fbwU7kAAAABHNzaDo=
|
# signingKey = key::sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIFtd5SEEgKWzR6617GqxhSIi//4Afq7iRP0ny6fbwU7kAAAABHNzaDo=
|
||||||
|
|
||||||
[column]
|
[column]
|
||||||
ui = auto
|
ui = auto
|
||||||
|
@ -134,6 +134,7 @@ format = ssh
|
||||||
|
|
||||||
[gpg "ssh"]
|
[gpg "ssh"]
|
||||||
allowedSignersFile = ~/.config/git/allowed_signers
|
allowedSignersFile = ~/.config/git/allowed_signers
|
||||||
|
defaultKeyCommand = /home/dln/.config/git/signing-key.sh
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
name = Daniel Lundin
|
name = Daniel Lundin
|
||||||
|
|
Loading…
Reference in a new issue