美文网首页
Homebrew国内源设置与常用命令

Homebrew国内源设置与常用命令

作者: 半城coding | 来源:发表于2021-01-14 17:43 被阅读0次

    原文地址:https://www.cnblogs.com/caizhendong/p/11372104.html

    brew源

    注意:使用国内源的时候一般不连接shadowsock等VPN,不然访问可能出错

    替换现有上游

    git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
    
    git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
    
    git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
    
    brew update
    

    复原

    (感谢Snowonion Lee提供说明)

    git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
    
    git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
    
    git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
    
    brew update
    

    相关文章

      网友评论

          本文标题:Homebrew国内源设置与常用命令

          本文链接:https://www.haomeiwen.com/subject/ztnvaktx.html