1

I cloned the repo from the URL mentioned in the dashboard settings in Heroku to a Windows machine. After committing changes, attempting to push to Heroku fails.

=> git push heroku master

fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.

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

I followed some instructions from here, and now I am getting

=> git push heroku master

The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxx/o.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,xx.xx.xx.xx' (RSA) to the list of known hosts.
git@heroku.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
mrzasa
  • 22,895
  • 11
  • 56
  • 94
arjun
  • 1,594
  • 16
  • 33

1 Answers1

1

Heroku git authenticates you using public keys that are added with heroku keys:add. You have to have a separate private/public SSH key pair for each machine you're working on.

Add a new key with heroku keys:add

And then verify it works with ssh -v git@heroku.com

https://devcenter.heroku.com/articles/keys#adding-keys-to-heroku

mrzasa
  • 22,895
  • 11
  • 56
  • 94