--- 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代理配置]]