From 192eb1a17e70a8b39ecc1cabd64e25ea5178e0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Colombaro?= Date: Thu, 11 Apr 2024 14:54:35 +0200 Subject: [PATCH] Use SSH key for commit sign --- dot_gitconfig.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index 31c5313..8c36c41 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -81,14 +81,18 @@ {{- end }} {{- if .signingkey }} signingKey = {{ .signingkey }} +{{- else }} + signingKey = ~/.ssh/id_ed25519.pub {{- end }} [tag] forceSignAnnotated = true [commit] gpgSign = true [gpg] -{{- if eq .chezmoi.os "windows" }} +{{- if .signingkey }} +{{- if eq .chezmoi.os "windows" }} program = "C:\\Program Files (x86)\\gnupg\\bin\\gpg.exe" +{{- end }} {{- else }} format = ssh {{- end }}