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

相关推荐
ai小鬼头3 小时前
Ollama+OpenWeb最新版0.42+0.3.35一键安装教程,轻松搞定AI模型部署
后端·架构·github
李大玄8 小时前
Google浏览器拓展工具 "GU"->google Utils
前端·javascript·github
每天吃饭的羊8 小时前
github上部署自己的静态项目
github
泰勒朗斯9 小时前
如何在新机器上设置github完成内容git push
git·github
qianmoQ9 小时前
GitHub 趋势日报 (2025年07月05日)
github
weixin_3077791310 小时前
批量OCR的GitHub项目
python·github·ocr
前端 贾公子12 小时前
monorepo + Turborepo 缓存
github
独立开阀者_FwtCoder13 小时前
放弃 JSON.parse(JSON.stringify()) 吧!试试现代深拷贝!
前端·javascript·github
网硕互联的小客服13 小时前
如何排查服务器中已经存在的后门程序?
运维·服务器·github
橘黄的猫15 小时前
深入浅出掌握 Git 子模块:项目管理利器
前端·github