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.
Using @cmpickle answer, I built a script to simplify the clone process.
It is hosted here: https://gist.github.com/gianlucaparadise/10286e0b1c5409bd1049d67640fb7c03
You can run it using the following line:
curl -sL https://git.io/JvtZ5 | sh -s repo_uri repo_folder
The git-daemon issue seems to have been resolved in v2.17.0 (verified with a non working v2.16.2.1). I.e. workaround of selecting text in console to "lock output buffer" should no longer be required.
From https://github.com/git/git/blob/v2.17.0/Documentation/RelNotes/2.17.0.txt:
- Assorted fixes to "git daemon". (merge ed15e58efe jk/daemon-fixes later to maint).
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.
None of the solutions above worked for me.
The solution that finally worked for me was switching SSH client. GIT_SSH environment variable was set to the OpenSSH provided by Windows Server 2019. Version 7.7.2.1
C:\Windows\System32\OpenSSH\ssh.exe
I simply installed putty, 0.72
choco install putty
And changed GIT_SSH to
C:\ProgramData\chocolatey\lib\putty.portable\tools\PLINK.EXE
In my case, I simply upgraded my version of OpenSSL. The older versions of OpenSSL have vulnerabilities and also do not have the latest algorithms which may be needed. As of today, the command openssl version
shows OpenSSL 1.1.1f 31 Mar 2020.
In my case this was quite helpful:
git clone --depth 1 --branch $BRANCH $URL
This will limit the checkout to mentioned branch only, hence will speed up the process.
Hope this will help.