Github 程序员加速 http和ssh代理设置

简单直接的输出干货,复制->粘贴->完活.

Http代理设置

全局

bash 复制代码
git config --global http.proxy socks5://127.0.0.1:10808

指定github

bash 复制代码
git config --global http.https://github.com.proxy socks5://127.0.0.1:10808

SSH代理设置

Linux

配置文件在home目录下的 .ssh/config 其中 nc 程序位于 /usr/bin/nc

bash 复制代码
$ cat ~/.ssh/config

Host github.com
Hostname ssh.github.com
User git
Port 443
ProxyCommand nc -v -x 127.0.0.1:10808 %h %p

Windows

使用Git Bash

bash 复制代码
$ cat ~/.ssh/config

Host github.com
Hostname ssh.github.com
User git
Port 443
ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -S 127.0.0.1:10808 %h %p
相关推荐
lkbhua莱克瓦243 小时前
Java基础——常用算法3
java·数据结构·笔记·算法·github·排序算法·学习方法
吃饺子不吃馅5 小时前
前端画布类型编辑器项目,历史记录技术方案调研
前端·架构·github
省四收割者5 小时前
GitHub Action工作流语法
笔记·github
QT 小鲜肉6 小时前
【Git、GitHub、Gitee】按功能分类汇总Git常用命令详解(超详细)
c语言·网络·c++·git·qt·gitee·github
散峰而望9 小时前
基本魔法语言函数(一)(C语言)
c语言·开发语言·编辑器·github
oil欧哟9 小时前
GitHub星标3万,OpenAI 官方支持——深度解读 AI Agent 连接协议的行业标准 MCP
人工智能·github
粟悟饭&龟波功9 小时前
【GitHub热门项目】(2025-11-07)
github
一名爱学习的ikun10 小时前
如何将本地文件上传至Github?【详细解释】
github
用户2217659279210 小时前
如何解决Spring Boot与其他框架集成时的版本冲突问题?
github