I've searched around for many hours on end looking to a solution to my seemingly easy-to-fix problem. It's not that my search turned up nothing, it's that my search turned up so many different solutions -none of which have worked.
Anyways, I am simply unable to push, pull, or fetch from my Heroku repository from my Mac. Every attempt gives me (as if it's mocking me) the following error:
'Permission denied (publickey). fatal: Could not read from remote
repository.'
I've tried (and re-tried) to fix it in many different ways. As I've said, I've spent a good chunk of the last two days searching around for an answer. Here are some of the things I've tried:
- heroku keys:clear followed by heroku keys:add
- Regenerating an ssh key on my own with 'ssh-keygen -t rsa'
- Clearing out my .ssh directory, followed by heroku keys:clear, followed by generating an ssh key
- Deleting my app on heroku and recreating one (fortunately not much was on there)
I can fetch from my GitHub repository fine, so I know it's not network connectivity (pinging heroku also works).
As a makeshift solution (that I hope doesn't turn into a permanent one), I've logged in to my Ubuntu Amazon AWS ec2 instance. Pulling and pushing to and from Heroku works perfectly. For this reason, I still feel as if the problem lies with the ssh key on my Mac. Both keys show up under my Heroku account. Does the email address at the end of the key matter?
EDIT: I can push and pull from GitHub fine (I'm not using ssh, however), so why not Heroku?
At this point I'm willing to try anything. Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…