Homebrew mirrors

I wrote a Python program before and needed to use it telnetas a client, but when I used it on a Mac telnet, I found that macOS High Sierra 10.13 no longer supports telnetcommands.
I try to use brew install telnetbut: 1

MacBook-Air:~ User$ brew install telnet
Updating Homebrew...

then no then

We can use the command

$ cd "$(brew --repo)"
$ git remote -v
origin  https://github.com/Homebrew/brew.git (fetch)
origin  https://github.com/Homebrew/brew.git (push)

Knowing that the official Homebrew source code repository address is https://github.com/Homebrew/brew.git, it is not difficult to see that this is a GitHub repository. We know that GitHub is not fast in China, which leads to very slow updates.

So we can solve it by changing the download source to a domestic mirror.

There are more than one domestic mirrors, and the more reliable ones are:

Tsinghua University open source software mirror site Homebrew mirror use help link:

USTC Mirror Help documentation Homebrew source usage help link:

Replace USTC mirror

Because there are many Homebrew mirrors on the HKUST Mirror Station, let's take the Homebrew mirror on the HKUST Mirror Station as an example.

  1. Replace the USTC mirror of the Homebrew source repository:
$ cd "$(brew --repo)"
$ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

brew updateThis will be much faster when using the command to update.
2. Replace the Homebrew core repository USTC image:

$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

This way, the installation will be much faster when executing the command brew install FORMULA...& . 3. Reset to official address:brew upgrade [FORMULA...]

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

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

  1. Lines that $begin with represent the command entered.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325183665&siteId=291194637