Skip to content

Instantly share code, notes, and snippets.

@mlafeldt
Created February 16, 2016 15:48
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mlafeldt/8e7d50ee0b1de44e256d to your computer and use it in GitHub Desktop.
Save mlafeldt/8e7d50ee0b1de44e256d to your computer and use it in GitHub Desktop.
Providing a Homebrew tap backed by private GitHub repo

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
@alexanderbird
Copy link

One very hacky option: set the url in the formula to file:///tmp/file.tar.gz and let your install instructions be:

curl https://url/to/file.tar.gz > /tmp/file.tar.gz
brew install <owner>/<repo>/<file>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment