How do I set up a remote Homebrew repository?

1.) On Artifactory, setup a new remote repository (for example, called homebrew-bottles)

and I pointed it to a remote repository location: 


http://homebrew.bintray.com/bottles


2.) Install Homebrew as described on http://brew.sh


3.) Edit /usr/local/Library/Homebrew/software_spec.rb

Search for and modify these lines:


DEFAULT_DOMAIN = <“http://your artifactory server”>.freeze

DEFAULT_ROOT_URL = “#{DEFAULT_DOMAIN}/<name of the remote repository>”.freeze


Once these lines are configured, Artifactory correctly caches Homebrew bottles.


4.) Try something like brew install wget