Could not resolve host 🌿 Git

fatal: unable to access 'https://github.com/…': Could not resolve host: github.com

DNS lookup for the Git host failed from this machine.

Seen on: Git

Meaning

No internet, broken DNS, VPN/proxy settings or a typo. Proxy environments need http.proxy configured.

Common causes

  • Offline / DNS issue
  • Proxy required but not configured
  • Typo in the URL

⚡ Quick fix

  1. Check DNS: nslookup github.com
  2. Configure proxy: git config --global http.proxy http://proxy:8080
  3. Fix the URL

Detailed fix by platform

Git

  1. git config --global http.proxy http://proxy.corp:8080

How to diagnose

  1. DNS — Resolves?
  2. Proxy — Required?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.