How to setup a Remote homebrew repository

Batel Tova
2022-01-13 00:47

1. Create a docker remote repository, named homebrew with the following URL: 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_DOCKER_REGISTRY_TOKEN=<artifactory-access-token>

Note: Don't use a Subdomain / Ports style Docker URL with Homebrew. The normal Artifactory URL with /homebrew on the end should work with the Brew client, for example "".

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

$brew install wget

$brew install wget


Homebrew Cask Support
While Artifactory can handle proxying Homebrew Bottles and Formulas, at this time it can't handle fetching Casks. The issue is that Cask dependencies can use any URL, and Artifactory's Docker repository can't serve as a generic Forward Proxy:

==> Downloading[…]-
==> Downloading from <———
   curl: (22) The requested URL returned error: 400