Skip to content

Instantly share code, notes, and snippets.

@hone
Last active October 26, 2021 12:11
Show Gist options
  • Select an option

  • Save hone/b0c0093374097313ab7f to your computer and use it in GitHub Desktop.

Select an option

Save hone/b0c0093374097313ab7f to your computer and use it in GitHub Desktop.

Revisions

  1. hone revised this gist Nov 25, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ $ heroku config:set GITHUB_AUTH_TOKEN=<my-read-only-token>

    ## Buildpacks

    > DISCLAIMER: "[Third-party buildpacks](https://devcenter.heroku.com/articles/third-party-buildpacks) contain software that is not under Heroku’s control and are not supported by Heroku. Please inspect the source of any buildpack you plan to use and proceed with caution."
    > DISCLAIMER: [Third-party buildpacks](https://devcenter.heroku.com/articles/third-party-buildpacks) contain software that is not under Heroku’s control and are not supported by Heroku. Please inspect the source of any buildpack you plan to use and proceed with caution.
    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

  2. hone revised this gist Nov 25, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,8 @@ $ heroku config:set GITHUB_AUTH_TOKEN=<my-read-only-token>

    ## Buildpacks

    > DISCLAIMER: "[Third-party buildpacks](https://devcenter.heroku.com/articles/third-party-buildpacks) contain software that is not under Heroku’s control and are not supported by Heroku. Please inspect the source of any buildpack you plan to use and proceed with caution."
    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

    ```sh
  3. hone revised this gist Nov 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@ First, you'll need a GitHub OAuth token to be used. There's ways to do it via th
    Assuming you already have a heroku app, you can set the token given that the netrc buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    $ heroku config:set GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```

    ## Buildpacks
  4. hone revised this gist Nov 24, 2015. 1 changed file with 0 additions and 30 deletions.
    30 changes: 0 additions & 30 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -27,34 +27,4 @@ $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-net
    $ heroku buildpacks:add heroku/ruby
    ```

    With all of that setup, you can new deploy.
    # Setting Up Private GitHub Repos with Bundler on Heroku

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    When setting up the Gemfile, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.

    ```ruby
    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```

    ## GitHub OAuth Token

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth. Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    Assuming you already have a heroku app, you can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```

    ## Buildpacks

    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

    ```sh
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```

    With all of that setup, you can new deploy.
  5. hone revised this gist Nov 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth. Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    Assuming you already have a heroku app, you can set the token given that the netr buildpack will use.
    Assuming you already have a heroku app, you can set the token given that the netrc buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
  6. hone revised this gist Nov 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    When setting up the Gemfile, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.
    When setting up the `Gemfile`, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.

    ```ruby
    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
  7. hone revised this gist Nov 24, 2015. 1 changed file with 1 addition and 82 deletions.
    83 changes: 1 addition & 82 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,86 +1,5 @@
    # Setting Up Private GitHub Repos with Bundler on Heroku

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby). Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth.

    Assuming we already have a heroku app, we can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```


    ```ruby
    source "https://rubygems.org"

    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```

    ```sh
    $ heroku create
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```
    # Setting Up Private GitHub Repos with Bundler on Heroku

    ## GitHub OAuth Token

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth. Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    Assuming we already have a heroku app, we can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```

    ## Buildpacks

    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

    ```sh
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```

    ```ruby
    source "https://rubygems.org"

    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```
    # Setting Up Private GitHub Repos with Bundler on Heroku

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    When setting up the Gemfile, make sure to use the https GitHub URL.

    ```ruby
    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```

    ## GitHub OAuth Token

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth. Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    Assuming we already have a heroku app, we can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```

    ## Buildpacks

    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

    ```sh
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```

    # Setting Up Private GitHub Repos with Bundler on Heroku

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    When setting up the Gemfile, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.
    @@ -138,4 +57,4 @@ $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-net
    $ heroku buildpacks:add heroku/ruby
    ```

    With all of that setup, you can new deploy.
    With all of that setup, you can new deploy.
  8. hone renamed this gist Nov 24, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  9. hone created this gist Nov 24, 2015.
    141 changes: 141 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,141 @@
    # Setting Up Private GitHub Repos with Bundler on Heroku

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby). Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth.

    Assuming we already have a heroku app, we can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```


    ```ruby
    source "https://rubygems.org"

    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```

    ```sh
    $ heroku create
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```
    # Setting Up Private GitHub Repos with Bundler on Heroku

    ## GitHub OAuth Token

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth. Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    Assuming we already have a heroku app, we can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```

    ## Buildpacks

    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

    ```sh
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```

    ```ruby
    source "https://rubygems.org"

    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```
    # Setting Up Private GitHub Repos with Bundler on Heroku

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    When setting up the Gemfile, make sure to use the https GitHub URL.

    ```ruby
    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```

    ## GitHub OAuth Token

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth. Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    Assuming we already have a heroku app, we can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```

    ## Buildpacks

    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

    ```sh
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```

    # Setting Up Private GitHub Repos with Bundler on Heroku

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    When setting up the Gemfile, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.

    ```ruby
    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```

    ## GitHub OAuth Token

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth. Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    Assuming you already have a heroku app, you can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```

    ## Buildpacks

    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

    ```sh
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```

    With all of that setup, you can new deploy.
    # Setting Up Private GitHub Repos with Bundler on Heroku

    To get a private GitHub repo to work on Heroku, you can leverage the [netrc buildpack](https://github.com/timshadel/heroku-buildpack-github-netrc) in conjunction with the [Heroku Ruby buildpack](https://github.com/heroku/heroku-buildpack-ruby).

    When setting up the Gemfile, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.

    ```ruby
    gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
    ```

    ## GitHub OAuth Token

    First, you'll need a GitHub OAuth token to be used. There's ways to do it via the commandline, but I find the [personal settings page](https://github.com/settings/tokens) the easiest way especially if you're using 2 factor auth. Since you'll only need read access make sure to set that and restrict access to things that aren't needed like gist.

    Assuming you already have a heroku app, you can set the token given that the netr buildpack will use.

    ```sh
    $ heroku config:add GITHUB_AUTH_TOKEN=<my-read-only-token>
    ```

    ## Buildpacks

    The heroku toolbelt supports chaining multiple buildpacks to be run in succession.

    ```sh
    $ heroku buildpacks:add https://github.com/timshadel/heroku-buildpack-github-netrc.git
    $ heroku buildpacks:add heroku/ruby
    ```

    With all of that setup, you can new deploy.