2

Yesterday I installed a new Git windows server 2.6.4 that was working fine with a Mac git client (git protocol)

Today I am struggling to get a 2nd client (Windows 7) to work. In the process of trying to make it work I have upgraded both the Windows server and client to the recently released git 2.7.0

I have tried disabling compression...I have tried both wireless and wired networks (the Windows client and server are sitting on the same desk). I have disabled AV on the client. I have tried tweaking the memory settings as suggested here

Here is the client output:

bash> git clone git://server.fqdn/repo.git
Cloning into 'repo'...
remote: 08:56:10.972997 git.c:348               trace: built-in: git 'pack-objects' '--revs' '--thin' '--stdout' '--progress' '--delta-base-offset'
remote: Counting objects: 76, done.
remote: Compressing objects: 100% (38/38), done.
Receiving objects: 100% (76/76), 8.31 KiB | 0 bytes/s, done.
fatal: read error: Invalid argument
fatal: early EOF
fatal: index-pack failed
bash>

Here is the server output:

bash> ./gitd.bat

D:\tools\gitd>set GIT_TRACE=1

D:\tools\gitd>D:\tools\Git\bin\git.exe daemon --reuseaddr --verbose --base-path=D:\git --export-all --enable=receive-pack
08:59:49.023778 git.c:561               trace: exec: 'git-daemon' '--reuseaddr' '--verbose' '--base-path=D:\git' '--export-all' '--enable=receive-pack'
08:59:49.023778 run-command.c:343       trace: run_command: 'git-daemon' '--reuseaddr' '--verbose' '--base-path=D:\git' '--export-all' '--enable=receive-pack'
[7376] Ready to rumble
09:00:03.056268 run-command.c:343       trace: run_command: 'D:\tools\Git\mingw64\libexec\git-core\git-daemon.exe' '--serve' '--reuseaddr' '--verbose' '--base-path=D:\git' '--export-all' '--enable=receive-pack'
[6492] Connection from 10...:54729
[6492] Extended attributes (27 bytes) exist 
[6492] Request upload-pack for '/repo.git'
09:00:03.087469 run-command.c:343       trace: run_command: 'upload-pack' '--strict' '--timeout=0' '.'
[6492] 09:00:03.134269 git.c:561               trace: exec: 'git-upload-pack' '--strict' '--timeout=0' '.'
[6492] 09:00:03.134269 run-command.c:343       trace: run_command: 'git-upload-pack' '--strict' '--timeout=0' '.'
[6492] 09:00:03.617872 run-command.c:343       trace: run_command: 'pack-objects' '--revs' '--thin' '--stdout' '--progress' '--delta-base-offset'

What else can I try?

Community
  • 1
  • 1
wytten
  • 2,111
  • 1
  • 18
  • 33

2 Answers2

7

Git daemon is known to work on Windows only when some text is selected in git daemon's console window (e.g., see git clone fails with "index-pack" failed?). This text selection delays daemon's output, which somehow helps (!). As soon as text selection is cleared (with Escape key), cloning/fetching fails most of the time. Select text again, and cloning/fetching resumes to work. The problem can be easily reproduced on Windows 10 using git 2.11.0.windows.1 by cloning locally via git clone git://127.0.0.1/my-repo.

Community
  • 1
  • 1
Oleg
  • 875
  • 6
  • 10
  • 1
    OMG WTF! This fixed it for me. But how is this "known"? – AyCe Nov 27 '17 at 21:55
  • @AyCe, this knowledge is documented in Martin's answer to the "git clone fails with "index-pack" failed?" question (see the link in my answer). I don't know how Martin managed to find that workaround. Also, this knowledge is documented in [git-for-windows issue #304: Investigate git daemon problems](https://github.com/git-for-windows/git/issues/304). – Oleg Dec 01 '17 at 16:00
0

I have found another solution, only start the **git-daemon.exe directly** e.g.
For the 64bit git:
"C:\Program Files\Git\mingw64\libexec\git-core\git-daemon.exe"

--> with the same paramters as git.exe.
Then it works without the selection text.

jufu
  • 1