Could not resolve host: github.com

Your machine can't turn github.com into an IP address — this is a network or DNS problem, not a Git problem.

Common causes

  • No internet connection
  • DNS server unreachable
  • VPN or corporate proxy blocking the request

Diagnostic commands

bash
$ ping github.com
bash
$ nslookup github.com

Solutions

  • Check your Wi-Fi or Ethernet connection
  • Disable a VPN temporarily to see if it's the cause
  • Try switching the remote URL to HTTPS as a workaround: `git remote set-url origin https://github.com/USER/REPO.git`

Related tutorials