How to access heroku's private github repository?

I have a private repo that I am trying to access when deploying to Heroku. However, Heroku does not allow me to clone a private repo and gives me the following error (as expected):

Host key verification failed.
       fatal: The remote end hung up unexpectedly
       Git error: command `git clone
       'git@github.com:pr/lm-models.git'
       "/tmp/build_3r0z0znww0zda/vendor/bundle/ruby/1.9.1/cache/bundler/git/lm-models-aab025aaadbe07202b16e1db7505ae1726f8723a"
       --bare --no-hardlinks` in directory /tmp/build_3r0z0znww0zda has failed.
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

I found this, but do not want to show my username / password in clear text:

Associating a heroku app with a private (organization) github repo

+5
source share
2 answers

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

+2

:

  • Github
  • list.txt list:

    git+https://your_user_name:your_git_token@github.com/your_company/your_module.git
    
+3

All Articles