设置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`

相关推荐
Gladiator57535 分钟前
博客记录-day148-力扣+面试
github
创实信息2 小时前
GitHub Copilot在产品/安全团队中的应用实践:处理Markdown、自动化报告与电子表格、使用CLI命令等
github·copilot·ai编程
七月丶3 小时前
📦 把 CLI 工具发布到 npm:gix 发布流程全解析(附 CI 自动化)
前端·后端·github
流沙krysent6 小时前
git常用指令
前端·github
运营猫小海豚6 小时前
Dootask任务管理实战——从需求到交付的闭环
前端·github
我是哪吒6 小时前
分布式微服务系统架构第118集:Future池管理容器-CompletableFuture
后端·面试·github
OpenTiny社区6 小时前
Node.js技术原理分析系列8——将Node.js内置模块外置
前端·node.js·github
Andy3227 小时前
029 期 告别复杂!三款神器让你的Docker管理轻松又高效
docker·github
唐诗7 小时前
前端也需要了解的 mcp 知识
前端·github·mcp
HelloGitHub8 小时前
一天 Star 破万的开源项目「GitHub 热点速览」
开源·github