The most common reason for “Git fatal: remote end hung up” is due to wrong ssh authentication or some other SSH issue.

This Stack overflow thread discusses and gives solution for this issue Git fatal: remote end hung up - Stack Overflow

I got this error because while installing Git in Windows , I choose to use Plink.exe because I had it already installed, but it turned out this option works with Pageant loaded with ssh keys. But I was not using ssh with keys. To solve this I changed GIT_SSH environment variable in windows from “C:\Program Files (x86)\Putty\bin\Plink.exe” to “C:\Program Files (x86)\Git\bin\ssh.exe”