Files
Linux/Git/Git配置本地代理.md
offends cee91802b3
Some checks failed
continuous-integration/drone Build is failing
synchronization
2025-08-25 15:57:40 +08:00

31 lines
725 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

> 本文作者:丁辉
# Git配置本地代理
> 本地启动代理后,使用命令更改端口
```bash
# socks5协议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
# 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
git config -l
```
- 取消 reset 代理设置
```bash
git config --global --unset http.proxy
git config --global --unset https.proxy
```