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
- Check DNS: nslookup github.com
- Configure proxy: git config --global http.proxy http://proxy:8080
- Fix the URL
Detailed fix by platform
Git
git config --global http.proxy http://proxy.corp:8080
How to diagnose
- DNS — Resolves?
- 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026