ssh: Could not resolve hostname github.com: Name or service not known; fatal: The remote end hung up unexpectedly Ask Question

ssh: Could not resolve hostname github.com: Name or service not known; fatal: The remote end hung up unexpectedly Ask Question

The process of setting up a GitHub account works just fine but it doesn't work when I try pushing my repository to GitHub. The error message it shows is as follows:

ssh: Could not resolve hostname github.com: Name or service not known
fatal: The remote end hung up unexpectedly

I have tried changing RSA keys and all but still getting error.

What causes this error?

ベストアンサー1

Recently, I have seen this problem too. Below, you have my solution:

  1. ping github.com, if ping failed. it is DNS error.
  2. sudo vim /etc/resolv.conf, the add: nameserver 8.8.8.8 nameserver 8.8.4.4

Or it can be a genuine network issue. Restart your network-manager using sudo service network-manager restart or fix it up

おすすめ記事