编辑
2025-06-28
部署项目遇到的问题
00

目录

加速方法
成功图片
扩展

在使用homebrew安装应用时,git clone github项目特别慢,因此需要用到github镜像文件下载。

加速方法

  1. 进入加速网站复制加速链接 https://www.7ed.net/gitmirror/hub.html

  2. git配置替换https命令

shell
git config --global url."https://hub.gitmirror.com/https://github.com/".insteadOf "https://github.com/"

该配置是将项目https://github.com/open-webui/open-webui地址更换为https://hub.gitmirror.com/https://github.com/open-webui/open-webui。从而达到加速的目的。

  1. 下载完成后,删除该配置。
shell
git config --global --unset url."https://hub.gitmirror.com/https://github.com/".insteadOf "https://github.com/"

由于此命令为全局配置需要删除,若只针对当前终端页,第一个命令移除--global即可

bash
git config url."https://hub.gitmirror.com/https://github.com/".insteadOf "https://github.com/"

成功图片

18e7253aa99898c63af68d12cfe7cae1.jpg

扩展

https://hub.gitmirror.com/ 文件加速失效,可尝试使用其它网站,例如:

镜像网站使用命令
https://mirror.ghproxy.com/git config url."https://mirror.ghproxy.com//https://github.com/".insteadOf "https://mirror.ghproxy.com/"
https://gitmirror.com/git config url."https://gitmirror.com/".insteadOf "https://mirror.ghproxy.com/"
https://fastgit.org/git config url."https://fastgit.org/".insteadOf "https://mirror.ghproxy.com/"

本文作者:lsq_137

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!