First of all, install Homebrew itself.
As the tap is a private Git repo, you need to generate a GitHub token
with repo
scope and then add this token to your ~/.netrc
file like this:
machine github.com
login <your GitHub user>
password <your GitHub token>
Now you can add the tap to your system:
brew tap user/repo
Afterwards, you can finally install tools provided by the tap:
Install the current version of tool XYZ:
brew install XYZ
Install the latest version of tool XYZ:
brew rm XYZ; brew install --HEAD XYZ
@KevinGimbel
It works with private repo by using the old removed install strategy from homebrew
GitHubPrivateRepositoryReleaseDownloadStrategy
.But to use it like how it is shown by @sgeb, you will need a sub-directory, lets say
my_strategies
, on the top of your repo's directory.You should now put the strategy definition inside
my_strategies
, lets say it is calledcustom_strategy.rb
.Then, for the rest of your formulas, which should be on the top of your repo's directory, put this on the top:
I got the idea from: https://gist.github.com/minamijoyo/3d8aa79085369efb79964ba45e24bb0e
I tried and it works perfectly fine. Just remember
brew audit
will not pass if you use this strategy, as the repo will seem unaccessible tobrew
.