Installing a gem from a private GitHub repo (Heroku)
Installing a gem from a private GitHub repo (Heroku) I have a private repository on Github that I want to use. I deploy my app to Heroku. How can I specify a private repository as the source on my gemfile? I imagine it wouldn't be enough to simply say gem "mygem", :git=>"my github address" As per suggestion from Heroku tech support, the easiest way to do this is by putting the username and password into the URL, as in Basic HTTP Auth, e.g. gem "my_gem", :git => 'https://my_username:my_password@github.com/my_github_account/my_repo.git', :ref => 'revision_no' On Heroku: Get your OAuth Token from GitHub To authenticate Bundler to GitHub, you will need an OAuth token. You can follow this guide to create a new one. Setting up your credentials To set up your credentials, use bundle-config: Then, add your GitHub credentials to Heroku: Then run the command :- heroku config:add BUNDLE_GITHUB__COM=github_use