Giter Club home page Giter Club logo

ssh-private-key-buildpack's Introduction

ssh-private-key-buildpack

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.

Example usage

Configure Multiple Buildpacks

Option 1: Heroku CLI or Dashboard

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

Option 2: Use heroku-buildpack-multi

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

Configure SSH Key

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. [email protected],example.com

$ heroku config:set SSH_HOSTS="[email protected],example.com"

ssh-private-key-buildpack's People

Contributors

kapetan avatar christianklotz avatar

Watchers

Paweł Lasek avatar Piotr Duda avatar Chris Gianelloni avatar  avatar James Cloos avatar  avatar Ajit Chakrapani avatar Przemysław Jakubczyk avatar  avatar Wojciech Kedzierski avatar Przemysław Hejman avatar Jonathan W. Zaleski avatar Rob avatar Tomasz avatar Michał Uziak avatar Tomasz Rogozik avatar Alex Jacks avatar Max Zhou avatar  avatar Paul Blazejewski avatar Applause Jenkins avatar  avatar Jordan King avatar  avatar Dean Vittum avatar Sathvik Dhanya avatar Jeff Rosenberg avatar  avatar  avatar Pawel Kowalczuk avatar Joey Perez avatar Jacek Poreda avatar Kamil Zawilski avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.