Instead of dealing with SSH keys, you can also try Heroku's new beta HTTP Git support. It just uses your API token and runs on port 443, so no SSH keys or port 22 to mess with.
To use HTTP Git, first make sure Toolbelt is updated and that your credentials are current:
$ heroku update
$ heroku login
(this is important because Heroku HTTP Git authenticates in a slightly different way than the rest of Toolbelt)
During the beta, you get HTTP by passing the --http-git
flag to the relevant heroku apps:create
, heroku git:clone
and heroku git:remote
commands. To create a new app and have it be configured with a HTTP Git remote, run this:
$ heroku apps:create --http-git
To change an existing app from SSH to HTTP Git, simply run this command from the app’s directory on your machine:
$ heroku git:remote --http-git
Git remote heroku updated
Check out the Dev Center documentation for details on how set up HTTP Git for Heroku.