ProjectStack
git

fatal: unable to access — Could not resolve host

Git couldn't connect to the remote server because the hostname couldn't be resolved. This is a network or DNS issue, not a Git configuration problem.

Common causes

  • You're offline or the network connection dropped
  • The remote URL contains a typo in the hostname
  • A VPN or proxy is blocking or rerouting DNS
  • Corporate network firewall is blocking outbound Git traffic

How to fix it

  1. Check your internet connection: ping github.com
  2. Verify the remote URL is correct: git remote -v
  3. Fix the remote URL if it's wrong: git remote set-url origin <correct-url>
  4. If on a VPN, try disconnecting it and retrying: git push / git pull

Example

fatal: unable to access 'https://github.com/user/repo.git/': Could not resolve host: github.com

Running git push or git pull with no network connection

Have a different error?

Paste any error message into the Error Translator to get an instant explanation.