How to setup a Remote homebrew repository

Batel Tova
2021-09-01 20:04

1. Create a docker remote repository, named homebrew with the following URL:https://ghcr.io as the following example:

User-added image

2. Add the environment variable HOMEBREW_ARTIFACT_DOMAIN, as follows:

export HOMEBREW_ARTIFACT_DOMAIN=<artifactory-url>/homebrew
For authenticated access:
export HOMEBREW_REGISTRY_ACCESS_TOKEN=<artifactory-access-token>

3. Now each brew install command will go through Artifactory like the following example:

$brew install wget

$brew install wget