Reputation: 1614
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.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Upvotes: 1
Views: 147
Reputation: 23317
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 [email protected]
https://devcenter.heroku.com/articles/keys#adding-keys-to-heroku
Upvotes: 1