Add proxy config to ssh & git

This commit is contained in:
Gabriel Augendre 2023-02-02 12:21:50 +01:00
parent ea59a29956
commit 98b181c607
2 changed files with 14 additions and 0 deletions

View file

@ -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

View file

@ -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" }}