マック自作の交換ミラーの下で

代わりにgitのミラー元と自作

A、gitの加速

  1. ドメイン名に対応するアドレスの検索
    github.com nslookupコマンド
    nslookupコマンドgithub.global.ssl.fastly.Netを
  2. hostsファイルを変更します。

    sudo vim /etc/hosts
    # add two lines at the end.
    31.13.66.1 github.global.ssl.fastly.net 
    13.229.188.59 github.com
  3. DNSキャッシュをフラッシュします(お使いのオペレーティングシステムの選択に応じて)

    # Mac
    sudo killall -HUP mDNSResponder
    # linux
    sudo /etc/init.d/networking restart

二、自作は清華ミラーリングを置き換えます

清華ミラーサイト:清華ミラーサイト

自作ガイドを置き換える:ヘルプドキュメントを

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

おすすめ

転載: www.cnblogs.com/cpl9412290130/p/12148705.html