--- id: fc35948f-dec0-4c86-9482-005d19313e01 slug: git-ssh-proxy-configuration title: 给 GIT 和 SSH 配置代理 summary: "" status: published tags: [] cover: "" version: 1 slug_source: manual slug_locked: true published_at: "2022-11-10T20:38:27+08:00" created_at: "2022-11-10T20:38:27+08:00" updated_at: "2026-01-07T18:10:45+08:00" --- 今天 push 不了项目,估计又是网络的问题,决定还是给git和ssh配置一下代理,不然太难受了。 配置记录如下: 1.使用socks5代理,我这边的端口是1089 ```shell git config --global http.https://github.com.proxy socks5://127.0.0.1:1089 ``` 2.修改 ~/.ssh/config 文件 ```shell Host github.com User git ProxyCommand nc -v -x 127.0.0.1:1089 %h %p ```