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 autoSetupRemote = true
[help] [help]
autocorrect = immediate autocorrect = immediate
{{ if hasKey . "proxy" }}
[http]
proxy = {{ .proxy.protocol }}://{{ .proxy.address }}:{{ .proxy.port }}
[https]
proxy = {{ .proxy.protocol }}://{{ .proxy.address }}:{{ .proxy.port }}
{{ end }}
[alias] [alias]
ci = commit ci = commit
cp = cherry-pick cp = cherry-pick

View file

@ -35,6 +35,14 @@ Host hyperhdr
hostname hyperhdr.local hostname hyperhdr.local
user pi 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 * Host *
AddKeysToAgent yes AddKeysToAgent yes
{{ if eq .chezmoi.os "darwin" }} {{ if eq .chezmoi.os "darwin" }}