homebrew代理设置

in #brew5 years ago

方法一

brew用curl下载,所以给curl挂上socks5的代理即可。
~/.curlrc文件中输入代理地址即可。
socks5 = "127.0.0.1:1080"

方法二:替换源

替换为中科大源

替换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 Bottles源:

就是在/.bashrc或者/.zshrc文件末尾加
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
这两个文件可以自己创建,/.bashrc/.bash_profile都可以
重置源

重置brew.git

cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git

重置homebrew-core:

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git
Sort:  

Congratulations @a186r! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.27
TRX 0.13
JST 0.032
BTC 61763.08
ETH 2899.43
USDT 1.00
SBD 3.49