Git/代理:修订间差异
来自康健生活
| 第68行: | 第68行: | ||
proxy = socks5://192.168.51.34:1080 | proxy = socks5://192.168.51.34:1080 | ||
proxy = https://192.168.51.34:1080 | proxy = https://192.168.51.34:1080 | ||
</syntaxhighlight>}} | |||
{{shc|<syntaxhighlight lang="bash"> | |||
git config -l --global</syntaxhighlight>|$|/home/kangkk}} | |||
可以通过域名使用 http.proxy 进行有条件的代理设置。例如: | |||
{{hc|head=~/.gitconfig|output=<syntaxhighlight lang="bash"> | |||
[http "https://example.com/"] | |||
http.proxy = socks5h://127.0.0.1:1080 | |||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
git config -l --global</syntaxhighlight>|$|/home/kangkk}} | git config -l --global</syntaxhighlight>|$|/home/kangkk}} | ||