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 时所更新内容)。

    参考

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

    清华大学开源软件镜像站

     

  • 相关阅读:
    Apache Cassandra 4.0新特性介绍
    NoSQLBench压测工具入门教程
    赵洋:深入了解Materialized View
    PHP与ECMAScript_1_变量与常量
    HTTP_5_通信数据转发程序:代理、网关、隧道
    HTTP_4_返回结果的HTTP状态码
    HTTP_3_HTTP报文
    HTTP_2_HTTP协议概要
    HTTP_1_Web及网络基础
    一个完整的产品设计流程——家庭安全管家
  • 原文地址:https://www.cnblogs.com/kunmomo/p/11282422.html
Copyright © 2011-2022 走看看