---
title: "homebrew源更新"
author: "fairy_xzc"
date: "2018-09-18T09:27:08Z"
tags: []
categories: ["操作系统"]
slug: "homebrew"
draft: false
lastmod: "2018-09-18T09:27:08Z"
id: 2430834
url: "https://agilestyle.iteye.com/blog/2430834"
---

替换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 
```

 

重置brew.git:

```
cd "$(brew --repo)"

git remote set-url origin https://github.com/Homebrew/brew.git
```

 

重置homebrew-core.git:

```
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

git remote set-url origin https://github.com/Homebrew/homebrew-core.git
```