Book Image

Heroku Cookbook

By : Mike Coutermarsh
Book Image

Heroku Cookbook

By: Mike Coutermarsh

Overview of this book

Heroku is a Platform as a Service that enables developers to rapidly deploy and scale their web applications. Heroku is designed for developer happiness, freeing developers from doing system administrative tasks such as configuring servers and setting up load balancers. Developers are able to focus on what they do best, building web applications, while leaving the details of deployment and scaling to the experts at Heroku. This practical guide is packed with step-by-step solutions to problems faced by every production-level web application hosted on Heroku. You'll quickly get comfortable with managing your Heroku applications from the command line and then learn everything you need to know to deploy and administer production-level web applications.
Table of Contents (17 chapters)
Heroku Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Managing SSH keys


Heroku manages access to our application's Git repository with SSH keys. When we first set up the Heroku Toolbelt, we had to upload either a new or existing public key to Heroku's servers. This key allows us to access our Heroku Git repositories without entering our password each time.

If we ever want to deploy our Heroku applications from another computer, we'll either need to have the same key on that computer or provide Heroku with an additional one. It's easy enough to do this via the CLI, which we'll learn in this recipe.

How to do it…

To get started, let's fire up a terminal. We'll be using the keys command in this recipe by performing the following steps:

  1. First, let's view all of the existing keys in our Heroku account:

    $ heroku keys
    === [email protected] Keys
    ssh-rsa AAAAB3NzaC...46hEzt1Q== [email protected]
    ssh-rsa AAAAB3NzaC...6EU7Qr3S/v [email protected]
    ssh-rsa AAAAB3NzaC...bqCJkM4w== [email protected]
    
  2. To remove an existing key...