Mac下Homebrew替换镜像
替换git和homebrew镜像源
一、git加速
- 查找域名对应的地址
nslookup github.com
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
二、homebrew替换为清华镜像源
清华镜像站:清华镜像站
homebrew替换指南:帮助文档
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
相关推荐
zjc 2020-09-03
TinyDolphin 2020-07-19
tangjianft 2020-06-26
Ashes 2020-06-14
haoeng 2020-06-07
tianyafengxin 2020-05-30
TinyDolphin 2020-05-19
jia 2020-05-15
炼金术士lee 2020-05-14
HJWZYY 2020-04-24
fly00love 2020-02-22
kanpiaoxue 2020-02-10
adc00 2020-01-24
azhou 2020-01-19
阿债的方寸天地 2020-01-18
LUCIEN0 2020-01-14
YoungForever 2013-04-04
WindowsandLinux 2013-07-24