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
相关推荐
逛逛GitHub11 小时前
刚刚!Open AI 宣布开源?
github
不是伍壹14 小时前
【R语言】GitHub Copilot安装-待解决
github·copilot
虾饺爱下棋14 小时前
pycharm上传github问题:rejected
人工智能·深度学习·github
鸠摩智首席音效师14 小时前
如何在 GitHub 中创建一个空目录 ?
github
Mr.W.T18 小时前
Spring Boot “约定大于配置”
github
不cong明的亚子21 小时前
github用户名密码登陆失效了
git·github
QC七哥1 天前
git开发流程以及github社区企业版
git·github
邂逅you1 天前
GitHub基本操作及Git简单命令
git·github
misty youth2 天前
github与git bash绑定问题
git·github·bash
油泼辣子多加2 天前
2025年02月14日Github流行趋势
github