I have googled and found many solutions but none work for me.
I am trying to clone from one machine by connecting to the remote server which is in the LAN network.
Network quality matters, try to switch to a different network. What helped me was changing my Internet connection from Virgin Media high speed land-based broadband to a hotspot on my phone.
Before that I tried the accepted answer to limit clone size, tried switching between 64 and 32 bit versions, tried disabling the git file cache, none of them helped.
Then I switched to the connection via my mobile, and the first step (git clone --depth 1