zoukankan      html  css  js  c++  java
  • Homebrew学习(六)之替换及重置homebrew、Homebred Core、Homebrew cask默认源

    替换及重置homebrew默认源

    中科大源

    替换官方源:

    // 替换brew.git:
    cd "$(brew --repo)"
    git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
    
    // 替换homebrew-core.git:
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

    // 替换homebrew-cask.git:
     cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask 

      git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

     

    切换回官方源:

    // 重置brew.git:
    cd "$(brew --repo)"
    git remote set-url origin https://github.com/Homebrew/brew.git
    
    // 重置homebrew-core.git:
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://github.com/Homebrew/homebrew-core.git
    // 替换homebrew-cask.git:
     cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask  

      git remote set-url origin https://github.com/Homebrew/homebrew-cask

     

    清华源

    替换官方源:

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

    切换回官方源:

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

    注:该镜像是 Homebrew 的 formula 索引的镜像(即 brew update 时所更新内容)。

    参考

    中科大开源镜像使用帮助列表

    清华大学开源软件镜像站

     

  • 相关阅读:
    ubuntu远程windows桌面
    spring boot 给返回值加状态 BaseData
    spring boot 拦截异常 统一处理
    IntelliJ IDEA spring boot 远程Ddbug调试
    IntelliJ IDEA 常用插件
    spring boot 请求地址带有.json 兼容处理
    spring boot 接口返回值去掉为null的字段
    spring boot 集成disconf
    Spring boot 自定义拦截器
    Linux下安装MySQL
  • 原文地址:https://www.cnblogs.com/kunmomo/p/11282422.html
Copyright © 2011-2022 走看看