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

相关推荐
雨声不在7 小时前
用mkdocs写文档#自动更新github-page
github
曹天骄9 小时前
DaemonSet 与 Deployment 的主要区别
github
遇到困难睡大觉哈哈12 小时前
hexo+GitHub Pages搭建个人博客完整教程
github
uhakadotcom12 小时前
快速构建交互式数据应用:Streamlit入门指南
后端·面试·github
xinxiyinhe16 小时前
GitHub上免费学习工具的精选汇总
学习·github
AI云极17 小时前
小白也能上手的大模型训练神器!MiniMind真把AI“平民化”了!
github
WebInfra18 小时前
Rspack 1.3 发布:内存大幅优化,生态加速发展
前端·javascript·github
GoGeekBaird18 小时前
基于 CAMEL-AI 🦉OWL框架的股票分析智能体
后端·github
helloworld_工程师18 小时前
DeepSeek R1 集成难题完美解决:DeepSeek4j来帮你解决
前端·后端·github
掘金安东尼20 小时前
上周前端发生哪些新鲜事儿? #407
前端·面试·github