fatal: unable to access 'https://github.com/example/repo.git/': Could not resolve host: github.com
TL;DRGit cannot reach GitHub because it cannot translate the name github.com into an IP address. This is almost always a network or DNS problem rather than a Git or GitHub issue itself.
Most likely cause: No working internet connection or DNS lookup failure for github.com
Try first: Test basic internet access
Likely causes
- No working internet connection or DNS lookup failure for github.commost likely
- Local firewall, VPN or proxy blocking the connectionpossible
- Temporary outage on the user's ISP or DNS providerless likely
How to fix it
Safest first: SafeChanges settingsDangerous
Test basic internet accessSafe
Open a web browser and visit https://github.com to see if the site loads normally.
Check DNS resolution from the command lineSafe
Open a terminal or command prompt and run the command below to test if github.com can be resolved.
ping github.comSwitch to a public DNS serverChanges settings
Change your network adapter to use Google's DNS (8.8.8.8) via the Windows network settings or your router.
If that didn't fix it
Run 'nslookup github.com' in the terminal and note the exact output or error message.
When to see a technician
Contact your network administrator or ISP if the same host-resolution error occurs for many different websites.
Related errors
codefatal: Authentication failed for 'https://github.com/user/repo.git/'codeAccess to fetch at 'https://api.example.com/data' from origin 'http://localhost:3000' has been blocked by CORS policy: NcodeError: Could not find or load main class com.example.Maincodefatal: not a git repository (or any of the parent directories): .gitcodePermission denied (publickey). fatal: Could not read from remote repository.codenpm ERR! code ERESOLVE unable to resolve dependency tree