DEV Community

Segun Adebayo
Segun Adebayo

Posted on

How to fix Github SSH Issue

Today, I was working on Chakra UI and ran into a weird issue with git and GitHub.

I saw this error:

ssh: Could not resolve hostname github.com: nodename nor servname provided, or not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I knew my SSH was there, I had the correct access and repo exists. It was a bit frustrating but I found a walkaround.

Here's the solution I found for macOS users:

  1. Go to "System Preference" > "Network"
  2. Select the network you're connected to
  3. Click "Advanced"
  4. Switch to the "DNS" tab and click the "+"
  5. Add Google's DNS servers below πŸ‘‡
# Here are the DNS servers for Google

8.8.8.8
8.8.4.4

That solved the problem!

PS: This is my very first post on DEV.to and I'm using this to flex my muscles in preparation for the other posts coming πŸ˜‡

Top comments (0)