How do I access a private github repo from heroku?

This worked for me:

  1. Generate a Github Access Token
  2. In requirements.txt list private module as follows:

    git+https://your_user_name:[email protected]/your_company/your_module.git
    

You need to use username/password in the Gemfile, or vendor the dependency. You can also use Gemfury (assuming it's a gem):

  • https://devcenter.heroku.com/articles/git-submodules#vendoring
  • http://gembundler.com/v1.3/bundle_package.html
  • https://devcenter.heroku.com/articles/gemfury