How do I set up a remote Homebrew repository?

1.) On artifactory setup a new remote repository. I called it: homebrew-bottles

and I pointed it to remote repository location: 


http://homebrew.bintray.com/bottles


2.) Install homebrew as per the instructions 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


and then the artifactory is correctly caching homebrew bottles.


4.) Try something like brew install wget