diff --git a/README.md b/README.md index b466911..75b664a 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ chezmoi purge - [ ] Setup gpg and gpg-agent - [ ] Import gpg keys +- [ ] (Linux) install https://github.com/Xgames123/git-credential-github ## TODO diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index 428cc62..f659a74 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -23,7 +23,15 @@ [commit] gpgsign = true [credential] +{{- if (eq .chezmoi.os "darwin") }} helper = /usr/local/share/gcm-core/git-credential-manager +{{ end -}} +{{- if (eq .chezmoi.os "linux") }} + credentialStore = secretservice +[credential "https://github.com"] + helper = cache + helper = github # important that you put it last because we only need to run gcg when other helpers have failed to give credentials +{{ end -}} [credential "https://dev.azure.com"] useHttpPath = true {{ end -}}