This commit is contained in:
@@ -4,27 +4,37 @@
|
|||||||
|
|
||||||
> 本地启动代理后,使用命令更改端口
|
> 本地启动代理后,使用命令更改端口
|
||||||
|
|
||||||
|
## 配置代理
|
||||||
|
|
||||||
|
- 全局代理
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# socks5协议,1080端口修改成自己的本地代理端口
|
git config --global http.proxy http://127.0.0.1:1080
|
||||||
|
git config --global https.proxy http://127.0.0.1:1080
|
||||||
|
```
|
||||||
|
|
||||||
|
- 针对特定网站代理
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# http协议
|
||||||
|
git config --global http.https://github.com.proxy https://127.0.0.1:1080
|
||||||
|
git config --global https.https://github.com.proxy https://127.0.0.1:1080
|
||||||
|
|
||||||
|
# socks5协议
|
||||||
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
|
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
|
git config --global https.https://github.com.proxy socks5://127.0.0.1:1080
|
||||||
|
|
||||||
# http协议,1081端口修改成自己的本地代理端口
|
|
||||||
git config --global http.https://github.com.proxy https://127.0.0.1:1081
|
|
||||||
git config --global https.https://github.com.proxy https://127.0.0.1:1081
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- 查看所有配置
|
## 查看所有配置
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git config -l
|
git config --global --list
|
||||||
```
|
```
|
||||||
|
|
||||||
- 取消 reset 代理设置
|
## 取消 reset 代理设置
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git config --global --unset http.proxy
|
git config --global --unset http.proxy
|
||||||
git config --global --unset https.proxy
|
git config --global --unset https.proxy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user