heroku: SSH鍵認証しているはずなのにパスワードを求められるを解決する方法

エラーの内容

>git push heroku master
Username for 'https://git.heroku.com':
Password for 'https://git.heroku.com':
remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry the git command.
remote: ! See documentation for details: https://devcenter.heroku.com/articles/http-git#authentication
fatal: Authentication failed for 'https://git.heroku.com/アプリ名.git/'

Username、Passwordを求められる。

解決策

だいたい下記のサイトの通り。www.d-wood.com

herokuの場合のSSHのURLは、アプリケーションのSettingsの「Git URL」てやつ。
これを

git remote set-url heroku

てしてやればいい。