troricleba
troricleba

Reputation: 151

"ssh: Could not resolve hostname heroku.com: Temporary failure in name resolution fatal: Could not read from remote repository."

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.

Upvotes: 1

Views: 18928

Answers (1)

torek
torek

Reputation: 489888

"Temporary failure in name resolution" means just what it says: the operating system software tried to turn a name, such as google.com or git.heroku.com, into an appropriate address, typically an IPv4 or IPv6 address. To do so, your computer consulted a Domain Name System resolver, asking it: Hey, what's the IP address for this name? The resolver came back with the Magic 8 Ball answer, try again later (or sorry, unable to resolve this right now: temporary failure).

As a result, your local machine was unable to connect to the correct IP address. If you try again later, it may work. Or perhaps this temporary failure is less temporary than the system thinks, in which case, you should investigate why your domain name resolution is failing.

(You can also hard-code the actual address, though in some cases this is a bad idea.)

Upvotes: 3

Related Questions