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 was getting the same error, on my side i resolved by running this command, In windows it has some memory issue.
git config --global pack.windowsMemory 256m