doc/Installation: make clear the env configs are advanced settings

Co-authored-by: Kevin <apainintheneck@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Bo Anderson 2023-11-26 03:27:54 +00:00
parent dbcb475b3b
commit 2cefdd0284
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -15,9 +15,13 @@ The macOS `.pkg` installer also installs Homebrew to its default prefix (`/opt/h
[Xcode](https://itunes.apple.com/us/app/xcode/id497799835) <sup>[3](#3)</sup>
* The Bourne-again shell for installation (i.e. `bash`) <sup>[4](#4)</sup>
## Git Remote Mirroring
## Advanced Configuration
You can use geolocalized Git mirrors to speed up Homebrew's installation and `brew update` by setting `HOMEBREW_BREW_GIT_REMOTE` and/or `HOMEBREW_CORE_GIT_REMOTE` in your shell environment with this script:
The Homebrew installer offers various advanced configuration settings. **Most users can skip this section and instead follow the instructions on the [homepage](https://brew.sh)!**
### Git Remote Mirroring
If you have issues connecting to GitHub.com, you can use Git mirrors for Homebrew's installation and `brew update` by setting `HOMEBREW_BREW_GIT_REMOTE` and/or `HOMEBREW_CORE_GIT_REMOTE` in your shell environment with this script:
```bash
export HOMEBREW_BREW_GIT_REMOTE="..." # put your Git mirror of Homebrew/brew here
@ -25,9 +29,11 @@ export HOMEBREW_CORE_GIT_REMOTE="..." # put your Git mirror of Homebrew/homebre
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
The default Git remote will be used if the corresponding environment variable is unset.
The default Git remote will be used if the corresponding environment variable is unset and works best for most users.
## Default Tap Cloning
**Note:** if you set these variables you are granting these repositories the same level of trust you currently grant to Homebrew itself. You should be extremely confident that these repositories will not be compromised.
### Default Tap Cloning
You can instruct Homebrew to return to pre-4.0.0 behaviour by cloning the Homebrew/homebrew-core tap during installation by setting the `HOMEBREW_NO_INSTALL_FROM_API` environment variable with the following:
@ -36,9 +42,9 @@ export HOMEBREW_NO_INSTALL_FROM_API=1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
This will make Homebrew install formulae and casks from the `homebrew/core` and `homebrew/cask` taps using local checkouts of these repositories instead of Homebrews API.
This will make Homebrew install formulae and casks from the `homebrew/core` and `homebrew/cask` taps using local checkouts of these repositories instead of Homebrews API. Unless you are a Homebrew maintainer or contributor, you should probably not globally enable this setting. It can easily be enabled later after installation should it be necessary.
## Unattended installation
### Unattended installation
If you want a non-interactive run of the Homebrew installer that doesn't prompt for passwords (e.g. in automation scripts), prepend [`NONINTERACTIVE=1`](https://github.com/Homebrew/install/#install-homebrew-on-macos-or-linux) to the installation command.