From 29b5b5b74d0553b98086459a614366ec320f0dfb Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 9 Oct 2023 08:42:05 +0200 Subject: Update git config to use SSH keys for signing commits It seems there are no expansions beyond tilde expansion inside the git configuration, so it is not possible to use a static configuration that links immediately to my SSH key, since they have variable names depending on their hostname. As such, a hard-coded config with a symlink to the key seemed like an okay solution for now. --- .config/git/config | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to '.config') diff --git a/.config/git/config b/.config/git/config index c8023bf..212776b 100644 --- a/.config/git/config +++ b/.config/git/config @@ -23,8 +23,8 @@ t = tag --sort=-v:refname tr = for-each-ref --sort=taggerdate --format '%(tag)' refs/tags -#[commit] -# gpgsign = true +[commit] + gpgsign = true [core] pager = less -R @@ -40,6 +40,9 @@ [difftool] prompt = false +[gpg] + format = ssh + [gpg "ssh"] allowedSignersFile = ~/.config/git/authorized_keys @@ -60,7 +63,10 @@ [safe] directory = * +[tag] + gpgsign = true + [user] - email = p.spek@tyil.nl - name = Patrick Spek - signingkey = 1660F6A2DFA75347322A4DC07A6AC285E2D98827 + email = p.spek@tyil.nl + name = Patrick Spek + signingKey = ~/.config/git/signingkey # Symlink to the SSH key to be used -- cgit v1.1