homebrew代理設置
阿新 • • 發佈:2018-07-20
替換 variable string ash -c 形式 span stc key
作者:曉龍醬
鏈接:https://www.jianshu.com/p/005963a4d843
來源:簡書
簡書著作權歸作者所有,任何形式的轉載都請聯系作者獲得授權並註明出處。
方法一
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
作者:曉龍醬
鏈接:https://www.jianshu.com/p/005963a4d843
來源:簡書
簡書著作權歸作者所有,任何形式的轉載都請聯系作者獲得授權並註明出處。
來源:https://www.jianshu.com/p/005963a4d843
homebrew代理設置