heroku/heroku-buildpack-ruby — pull request #85 by ejholmes (2013-04-14 07:55:43+00:00)
Title: Use SSH key from env if provided.

I think this is a better way to handle private GitHub gem dependencies.

If a user adds an SSH_KEY env var (and assuming they're using [user-env-compile](https://devcenter.heroku.com/articles/labs-user-env-compile)), this allows private gems to be cloned from GitHub, without going through hoops like [this](https://gist.github.com/masonforest/4048732).

Thoughts?

**Example**

```bash
heroku labs:enable user-env-compile -a foo-bar-1234
heroku config:set SSH_KEY="$(cat ~/.ssh/id_rsa)" -a foo-bar-1234
```

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

gem 'rake'
gem 'private-gem', git: 'git@github.com:ejholmes/private-gem.git'
```