I've been working on a repository for some time, and "git push heroku master" always worked, but suddenly it stopped working. The first error I got was:
fatal: unable to access 'https://git.heroku.com/salty-escarpment-27409.git/': Could not resolve host: git.heroku.com
I googled this and found this question: Cannot push to Heroku 'fatal: unable to access..Could not resolve host: (nil); nodename nor servname provided, or not known'
I tried the first suggestion there - deleting and re-adding heroku as remote - and then I got this error:
ssh: Could not resolve hostname heroku.com: Temporary failure in name resolution
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I tried the other suggestions from the question - running heroku keys:add and opening another terminal - which didn't make a difference.