aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-10-09 08:42:05 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-10-09 08:42:05 +0200
commit29b5b5b74d0553b98086459a614366ec320f0dfb (patch)
tree40deda3eb37c42cb6cbb1207b93e29e82cdb342e /.config
parent0220722ecbc56be5f3214904d89583dfa0ac573a (diff)
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.
Diffstat (limited to '.config')
-rw-r--r--.config/git/config16
1 files changed, 11 insertions, 5 deletions
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