The Next Generation Platform is Coming - Get Ready Now!
GitHub Readme.md
A Heroku buildpack for setting the ssh private key as part of the application build. It's meant to be used as part of a setup using multiple buildpacks, so other buildpacks can authenticate with hosts using ssh keys, for instance to install dependencies from private git repositories.
Add the buildpack to your Heroku app either using the CLI or the Heroku dashboard. The ssh-private-key-buildpack
needs to run before any buildpack trying to get ssh access. In the following example, it runs before the heroku/go
buildpack.
$ heroku buildpacks:set --index 1 https://github.com/debitoor/ssh-private-key-buildpack.git
$ heroku buildpacks:add heroku/go
Instead of setting the buildpacks directly with Heroku they can also be configured using a .buildpacks
in combination with heroku-buildpack-multi
.
$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-multi.git
The same example given for the CLI use would have the following .buildpacks
file.
$ cat .buildpacks
https://github.com/debitoor/ssh-private-key-buildpack.git
https://github.com/heroku/heroku-buildpack-go
Set the private key environment variable SSH_KEY
of your Heroku app (note that the key needs to be base64 encoded).
$ heroku config:set SSH_KEY=$(cat path/to/your/keys/id_rsa | base64)
By default the buildback adds Github to known_hosts
. However you can configure your app to allow custom hosts, too. All that's needed is the set SSH_HOSTS
for you app to a comma-separated list of hosts, e.g. git@github.com,example.com
$ heroku config:set SSH_HOSTS="git@github.com,example.com"
Copy the snippet above into CLI.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.