I got this error because I used multiple heroku accounts:
I wanted to do this so that I could βplayβ on my own with my Heroku account, collaborating with others on the team / project.
This is separate from the Heroku concept of several people working in a team: I wanted the team account to be the owner of the collaboration application, so that my individual account could act as a less privileged collaborator, like the rest of the team. Only the owner receives: adds / deletes paid add-ons, deletes / renames the application and views invoices.
To support multiple accounts (e.g. your own separate heroku account) you need to add this not-so-well-documented add-on:
$ Heroku plugins: install git: //github.com/ddollar/heroku-accounts.git
see https://github.com/ddollar/heroku-accounts
Here is what your git SSH installation will look like:
(venv)MacPro:your_project username$ more .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = ssh:// your_username@git.your _org.com/your_project.git [branch "master"] remote = origin merge = refs/heads/master [remote "heroku_kb"] url = git@heroku.individual :your_individual_app.git fetch = +refs/heads/*:refs/remotes/heroku/* [remote "heroku_ocp"] url = git@heroku.your _project:your_team_app.git fetch = +refs/heads/*:refs/remotes/heroku/* [heroku] account = individual
The last three sections above define two separate hero remote controls and indicate which one is active.
The heroku-accounts add-on does all this by adding ~ / .ssh / config entries:
Host heroku.individual HostName heroku.com IdentityFile "/Users/username/.ssh/identity.heroku.individual" IdentitiesOnly yes Host heroku.your_project HostName heroku.com IdentityFile "/Users/username/.ssh/identity.heroku.your_project" IdentitiesOnly yes
If you do not separate the accounts this way, one SSH key will interfere with the other, and you will end up in SSH limbo, like me, having fun checking the google / forum error that looks like this:
MacPro:your_project username$ git push heroku master ! Your key with fingerprint cf:5b:6b:91:d5:71:e8:8b:73:dc:cf:86:56:fd:7a:49 is not authorized to access [insert appname here]. fatal: The remote end hung up unexpectedly