How do I access a private github repo from heroku?
heroku, ssh-keys
Solution
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
Problem
I have a private repo that I'm trying to access when deploying to Heroku. However, Heroku doesn't let me clone the private repo, and gives me the following error (as i would expect): ``` 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 have found this, but do not want to display my username/password in clear text: Linking heroku app to a private(organization) github repo