Skip to main content

Solving ‘Could not resolve host: github.com’ issue

Recently I ran into this issue while trying to clone one of my own repository from GitHub

C:\GitHub\FS>git clone https://github.com/<username>/FS.git
Cloning into 'FS'...
fatal: unable to access 'https://github.com/<username>/FS.git/': Could not resolve host: github.com

At first I thought that this could be due to some proxy setting. So I tried to unset it by executing below command -

C:\GitHub\FS>git config --global --unset https.proxy

But that didn’t fix the problem and I was still getting the same error.

As it turned out later, the culprit was my VPN connection. Turning off the VPN fixed the issue.

For the records, I was using ‘Surfshark’ on my Windows 10 laptop.

Comments