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.
I got this error when git ran out of memory.
Freeing up some memory (in this case: letting a compile job finish) and trying again worked for me.