brew.git
- 替换brew.git 仓库地址:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
- 还原
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
homebrew-core.git
- 替换homebrew-core.git 仓库地址:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
- 还原
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git
homebrew-bottles
- 替换homebrew-bottles 访问地址(zsh)
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
- 还原
vi ~/.zshrc
删除 HOMEBREW_BOTTLE_DOMAIN 这一行配置
source ~/.zshrc
Connection refuesed解决
首先确保代理使用正常,如不是代理问题请参考如下办法
curl: (7) Failed to connect to 你的报错URL port 443: Connection refsused
- 登录
ipaddress.com
- 通过URL 找到IP地址
- 将查询到的IP 绑定到 URL
- 完成
网友评论