代わりにgitのミラー元と自作
A、gitの加速
- ドメイン名に対応するアドレスの検索
github.com nslookupコマンド
nslookupコマンドgithub.global.ssl.fastly.Netを 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
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