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.
To get started, let's fire up a terminal. We'll be using the keys
command in this recipe by performing the following steps:
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]
To remove an existing key...