diff --git a/private_dot_gitconfig.tmpl b/private_dot_gitconfig.tmpl index 333d531..5385919 100644 --- a/private_dot_gitconfig.tmpl +++ b/private_dot_gitconfig.tmpl @@ -12,6 +12,12 @@ autoSetupRemote = true [help] autocorrect = immediate +{{ if hasKey . "proxy" }} +[http] + proxy = {{ .proxy.protocol }}://{{ .proxy.address }}:{{ .proxy.port }} +[https] + proxy = {{ .proxy.protocol }}://{{ .proxy.address }}:{{ .proxy.port }} +{{ end }} [alias] ci = commit cp = cherry-pick diff --git a/private_dot_ssh/config.tmpl b/private_dot_ssh/config.tmpl index ac3d494..7f1ad0c 100644 --- a/private_dot_ssh/config.tmpl +++ b/private_dot_ssh/config.tmpl @@ -35,6 +35,14 @@ Host hyperhdr hostname hyperhdr.local user pi +Host github.com +{{ if hasKey . "proxy" }} + Hostname ssh.github.com + Port 443 + User git + ProxyCommand nc -X connect -x {{ .proxy.address }}:{{ .proxy.port }} %h %p +{{ end }} + Host * AddKeysToAgent yes {{ if eq .chezmoi.os "darwin" }}