Git push heroku master, get an error

When I type this command git push heroku master and that is the result I got Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Then I made a new ssh key generating by Heroku but still the same result.

Anyone can help.

Hey there,

  1. Do you have a valid local SSH key?
  2. Did you add this local SSH key to Heroku?
  3. Do you have multiple local SSH keys?If yes, did you set the correct one to the heroku domain? (in ~/.ssh/config)

Hi Miku,

I followed the steps that you provide. except, I can’t validate the connection in Heroku and I got this error:

debug1: Offering RSA public key: /Users/jonmountjoy/.ssh/github_rsa
Permission denied (publickey).

Seems you created your SSH key with github.

I would try this stackoverflow solution and see if something changes.

After try adding the key, the key was added. But I got this response:

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:
fatal: Authentication failed for ''