设置github 代理

场景:执行CI需要下载GitHub仓库源码。访问很慢,有时会被中断。因此需要配置github代理。

代理网站更新频繁,可以在搜索引擎搜索关键词`github代理网站`,寻找最新可靠的代理网站。

假设代理网站是:

https://my-gh-proxy.top

单次下载配置:

`git clone https://my-gh-proxy.top/https://github.com/https://github.com/bytedance/UI-TARS-desktop\`

全局配置:

`git config --global url."https://my-gh-proxy.top/https://github.com/".insteadOf https://github.com/\`

真正配置在` ~/.gitconfig`文件里。

```bash

cat ~/.gitconfig

```

```bash

user

name = your-name

email = your-email

core

editor = vim

url "https://my-gh-proxy.top/https://github.com/"

insteadOf = https://github.com/

```

移除全局配置:

`git config --global 00unset url."https://my-gh-proxy.top/https://github.com/".insteadOf`

相关推荐
正经教主14 小时前
【Git】Git05-04:Github分支管理与协作流程
git·github
CoderJia程序员甲17 小时前
GitHub 热榜项目 - 日榜(2025-11-22)
ai·开源·llm·github·ai教程
小Lu的开源日常17 小时前
踩坑日记:为什么Git 突然 Push 不上去了
git·ssh·github
LZ7工作室18 小时前
MAC编程:在MACOS安装和使用 Git 的方法
网络·git·macos·github·个人开发
skywalk81631 天前
github创建项目后,应该用main还是master作为默认branch?
git·github
正经教主1 天前
【Git】Git07:GitHub desktop使用教程【可选】
git·github
CoderJia程序员甲1 天前
GitHub 热榜项目 - 日榜(2025-11-20)
ai·开源·大模型·github·ai教程
JinSo2 天前
Ultracite:为 AI 时代打造的零配置代码规范工具
前端·javascript·github
uhakadotcom2 天前
Next.js 从入门到精通(1):项目架构与 App Router—— 文件系统路由与目录结构全解析
前端·面试·github
x***58702 天前
GitHub星标10万+的Redis项目,使用教程
数据库·redis·github