Solution 1: Could be caused by incorrect proxy settings.
Run the following commands then try to git clone again
git config --global --unset http.proxy
git config --global --unset https.proxy
Solution 2: Could be caused by incorrect nameservers.
Run the command shown below
sudo nano /etc/resolv.conf
Change nameserver to 8.8.8.8, save the file and then run git clone again