更新docker 文档

This commit is contained in:
2024-02-02 15:46:50 +08:00
parent 78612e55a7
commit 46c343c1d6
2 changed files with 102 additions and 29 deletions

View File

@ -2,9 +2,44 @@
#### 配置代理
http 协议代理
```bash
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy ttp://127.0.0.1:7890
//设置全局代理
//http
git config --global http.proxy http://127.0.0.1:1080
//https
git config --global https.proxy http://127.0.0.1:1080
//使用socks5代理的 例如ssssr 1080是windows下ss的默认代理端口,mac下不同或者有自定义的根据自己的改
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080
//只对github.com使用代理其他仓库不走代理
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
git config --global https.https://github.com.proxy socks5://127.0.0.1:1080
//取消github代理
git config --global --unset http.https://github.com.proxy
git config --global --unset https.https://github.com.proxy
//取消全局代理
git config --global --unset http.proxy
git config --global --unset https.proxy
```
ssh 协议代理
```bash
//对于使用git@协议的可以配置socks5代理
//在~/.ssh/config 文件后面添加几行,没有可以新建一个
//socks5
Host github.com
User git
ProxyCommand connect -S 127.0.0.1:1080 %h %p
//http || https
Host github.com
User git
ProxyCommand connect -H 127.0.0.1:1080 %h %p
```
#### 更新git