summaryrefslogtreecommitdiff
path: root/dot_gitconfig.tmpl
diff options
context:
space:
mode:
authorIbrahim Muftee <ibrahim@muftee.net>2024-04-12 00:06:41 -0500
committerIbrahim Muftee <ibrahim@muftee.net>2026-07-01 00:23:31 -0400
commit1ea8e7a393e34770766b4231ded16cba7315cc52 (patch)
treebf785ab644fd41a21d30ee87ae4d48a250f7aaea /dot_gitconfig.tmpl
parent15eda9cae989b28ca8547be00232cb09c77246b3 (diff)
fix(git): change gh auth config for Windows
Diffstat (limited to 'dot_gitconfig.tmpl')
-rw-r--r--dot_gitconfig.tmpl12
1 files changed, 12 insertions, 0 deletions
diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl
index ae1d845..6405a9e 100644
--- a/dot_gitconfig.tmpl
+++ b/dot_gitconfig.tmpl
@@ -1,3 +1,6 @@
+# vim:ft=gitconfig
+# {{- /* This file supports Go's text/template language. */ -}}
+
[push]
autoSetupRemote = true
default = current
@@ -15,3 +18,12 @@
autoUpdate = true
[branch]
sort = committerdate
+
+{{ if and (eq .chezmoi.os "windows") (isExecutable "gh") -}}
+[credential "https://github.com"]
+ helper =
+ helper = !'C:\\Users\\muftei\\scoop\\apps\\gh\\current\\bin\\gh.exe' auth git-credential
+[credential "https://gist.github.com"]
+ helper =
+ helper = !'C:\\Users\\muftei\\scoop\\apps\\gh\\current\\bin\\gh.exe' auth git-credential
+{{ end -}}