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

相关推荐
追逐时光者34 分钟前
2个 GitHub 实用辅助神器,帮你快速了解和上手 GitHub 开源项目(附带 GitHub 加速神器)!
github
寻月隐君2 小时前
Web3实战:Solana CPI全解析,从Anchor封装到PDA转账
后端·web3·github
OpenTiny社区19 小时前
开源之夏报名倒计时3天!还有9个前端任务有余位,快来申请吧~
前端·github
王景程19 小时前
SELinux是什么以及如何编写SELinux策略
git·github
宝桥南山21 小时前
DeepSeek - 尝试一下GitHub Models中的DeepSeek
microsoft·ai·微软·c#·github·.net
lifeng43211 天前
在 CentOS 上将 Ansible 项目推送到 GitHub 的完整指南
centos·github·ansible
小华同学ai1 天前
千万别错过!这个国产开源项目彻底改变了你的域名资产管理方式,收藏它相当于多一个安全专家!
前端·后端·github
独立开阀者_FwtCoder1 天前
一个 Cursor mdc 自动生成器,基于Gemini 2.5,很实用!
前端·javascript·github
我是哪吒1 天前
分布式微服务系统架构第144集:FastAPI全栈开发教育系统
后端·面试·github
梓羽玩Python1 天前
PDF解剖大师来了!LandingAI开源神器,这个Python库让百页文档秒变结构化数据!
python·github