首页 > 系统服务 > 详细

Mac 修改brew源

时间:2021-06-04 17:56:48      阅读:25      评论:0      收藏:0      [点我收藏+]

阿里云源

# 替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 刷新源
brew update

清华源

# 替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
# 替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
# 刷新源
brew update

需要注意的是,更新可能会很长时间,请耐心等待。

查看源地址

% cd "$(brew --repo)"
% git remote -v      
origin	https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git (fetch)
origin	https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git (push)
% cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
% git remote -v                                          
origin	https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git (fetch)
origin	https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git (push)

Mac 修改brew源

原文:https://www.cnblogs.com/jiqing9006/p/14849458.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!