Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Heroku buildpack for setting the server's ssh private key from an environment variable
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
.gitignore
LICENCE
README.mkd

README.mkd

Heroku buildpack: SSH

Reads and sets ssh private key from an environment variable. Designed to be used with heroku-buildpack-compose to allow build process to access private resources without storing unencrypted keys in the repository.

Usage

This buildpack currently depends on the user env compile labs addon to be able to access the ssh key. To enable run:

heroku labs:enable user-env-compile

Set SSH_KEY variable to private key:

heroku config:set SSH_KEY="`cat /path/to/id_rsa`"

The key must not require a password to use. Before your application is run the SSH_KEY so that it is not accessible if an instance is compromised.

Enable the compose buildpack

heroku config:set BUILDPACK_URL=https://github.com/bwhmather/heroku-buildpack-compose.git

Create .buildpacks file:

https://github.com/${YOUR_NAME}/heroku-buildpack-ssh.git
ssh://git@github.com:${YOUR_NAME}/top-secret-buildpack.git
https://github.com/heroku/heroku-buildpack-something-something.git

This buildpack should obviously be loaded before buildpacks requiring access to private repositories.

It is highly recommended that you use your own fork as updates may break backwards compatibility.

Bugs

Please report any bugs to using the issue tracker.

Pull requests are welcome.

Something went wrong with that request. Please try again.