Skip to content

Instantly share code, notes, and snippets.

@Di9
Forked from mlafeldt/x.md
Created October 5, 2019 15:54
Show Gist options
  • Save Di9/2325eba0914f87b5e620d59fb74a1801 to your computer and use it in GitHub Desktop.
Save Di9/2325eba0914f87b5e620d59fb74a1801 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment