Git/代理:修订间差异
来自康健生活
创建页面,内容为“== 全局代理 == {{shc|<syntaxhighlight lang="bash"> git config --global http.proxy http://192.168.51.34:808 git config --global https.proxy https://192.168.51.34:808</syntaxhighlight>|$|/home/kangkk}} 取消代理 {{shc|<syntaxhighlight lang="bash"> git config --global --unset http.proxy git config --global --unset https.proxy</syntaxhighlight>|$|/home/kangkk}} === 分流 === 只对特定仓库进行代理 {{shc|<syntaxhighlight lang="bash"> git config -…” |
|||
| 第22行: | 第22行: | ||
git config --global http.https://github.com.proxy socks5://192.168.51.34:1080 | git config --global http.https://github.com.proxy socks5://192.168.51.34:1080 | ||
git config --global https.https://github.com.proxy socks5://192.168.51.34:1080</syntaxhighlight>|$|/home/kangkk}} | git config --global https.https://github.com.proxy socks5://192.168.51.34:1080</syntaxhighlight>|$|/home/kangkk}} | ||
== 配置文件 == | |||
{{hc|head=~/.gitconfig|output=<syntaxhighlight lang="bash"> | |||
[http] | |||
proxy = socks5://192.168.51.34:1080 | |||
proxy = http://192.168.51.34:1080 | |||
[https] | |||
proxy = socks5://192.168.51.34:1080 | |||
proxy = https://192.168.51.34:1080 | |||
</syntaxhighlight>}} | |||
{{shc|<syntaxhighlight lang="bash"> | |||
git config -l --global</syntaxhighlight>|$|/home/kangkk}} | |||