Files
nexus/wiki/concepts/Git代理配置.md
2026-04-14 16:02:50 +08:00

32 lines
703 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.
---
title: "Git代理配置"
type: concept
tags: [Git, 代理, GitHub]
sources: [git-push-connection-reset]
last_updated: 2026-04-14
---
## Definition
为Git单独设置HTTP或SOCKS5代理解决国内访问GitHub的连接问题。
## HTTP代理配置
```bash
git config --global http.proxy http://127.0.0.1:10809
git config --global https.proxy http://127.0.0.1:10809
```
## SOCKS5代理配置
```bash
git config --global http.proxy socks5://127.0.0.1:10808
git config --global https.proxy socks5://127.0.0.1:10808
```
## 取消代理
```bash
git config --global --unset http.proxy
git config --global --unset https.proxy
```
## Connections
- [[GitHub]] ← 解决方案 ← [[Git代理配置]]