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
相关推荐
粥里有勺糖14 小时前
视野修炼-技术周刊第129期 | 上一次古法编程是什么时候
前端·javascript·github
无限进步_15 小时前
【C++】验证回文字符串:高效算法详解与优化
java·开发语言·c++·git·算法·github·visual studio
Gavin_ZYX15 小时前
Skill 管理过于繁琐,不如写个自动同步的工具
人工智能·架构·github
Hommy8815 小时前
【开源剪映小助手-客户端】桌面客户端
python·开源·node.js·github·剪映小助手
张二娃同学17 小时前
Claude Code 使用教程:下载安装、CC Switch 配置、MiniMax API 获取与启动实操
人工智能·windows·深度学习·github·claude code
华仔啊17 小时前
写简历太痛苦?这个开源项目用 AI 帮你一键搞定
github
70asunflower18 小时前
个人主页从 0 到 1:Jekyll + GitHub Pages + AI Agent 完全指南
github·个人主页
无限进步_18 小时前
【C++】重载、重写和重定义的区别详解
c语言·开发语言·c++·ide·windows·git·github
历程里程碑18 小时前
1 . Git本地操作:版本控制 跨平台协作 仓库核心
java·开发语言·数据结构·c++·git·gitee·github
zhensherlock20 小时前
Protocol Launcher 系列:Mail Assistant 轻松发送 HTML 邮件
前端·javascript·typescript·node.js·html·github·js