fatal: read error: Invalid argument

1,955 views
Skip to first unread message

ka...@quipsy.de

unread,
Mar 23, 2015, 9:24:56 AM3/23/15
to msy...@googlegroups.com
We are two git newbees facing trouble with git fetch and git daemon on Windows 7.

We are using MSYSGIT 1.9.5 and "git bash" on Windows 7 Pro SP1 (64 Bit).

git daemon is started on our two PCs to allow me and my buddy to synchronize our work. Firewalls have TCP port 9418 open. All over the last days we could perfectly fetch each other's commits using git fetch my-buddy. Since today it does not work anymore, but we have not changed anything!

git ls-remote my-buddy is working fine! :-)

git fetch my-buddy shows an error message:


$ git fetch my-buddy

remote: Counting objects: 262, done.

remote: Compressing objects: 100% (83/83), done.

fatal: read error: Invalid argument

fatal: early EOFs:  91% (113/124)

fatal: index-pack failed


What can we do to fix this? We're desparate! :-(


Thanks!

-Markus

Johannes Schindelin

unread,
Mar 23, 2015, 12:07:44 PM3/23/15
to ka...@quipsy.de, msy...@googlegroups.com
Hi Markus,

On 2015-03-23 14:22, ka...@quipsy.de wrote:
> We are two git *newbees *facing trouble with git fetch and git daemon
> on
> Windows 7.
>
> We are using MSYSGIT 1.9.5 and "git bash" on Windows 7 Pro SP1 (64
> Bit).
>
> git daemon is started on our two PCs to allow me and my buddy to
> synchronize our work. Firewalls have TCP port 9418 open. All over the
> last
> days we could perfectly fetch each other's commits using git fetch
> my-buddy.*
> Since today it does not work anymore, but we have not changed
> anything!*
>
> git ls-remote my-buddy is working fine! :-)
>
> git fetch my-buddy shows an error message:
>
>
> $ git fetch my-buddy
>
> remote: Counting objects: 262, done.
>
> remote: Compressing objects: 100% (83/83), done.
>
> fatal: read error: Invalid argument
>
> fatal: early EOFs: 91% (113/124)
>
> fatal: index-pack failed

This sounds suspiciously like the issue that
https://github.com/msysgit/git/pull/70 wants to solve. Unfortunately,
the patch is way too large for what it tries to do (if really all it
wants to do is wait a little before exiting so that the clients can
drain the socket buffers.).

You could try whether that Git solves your issues by downloading and
running the net installer as per https://msysgit.github.io/, then run

git fetch origin refs/pull/70/head
git checkout FETCH_HEAD
make git-daemon.exe

and copying that executable into your Git for Windows installation.

Ciao,
Johannes

Konstantin Khomoutov

unread,
Mar 24, 2015, 8:19:49 AM3/24/15
to ka...@quipsy.de, msy...@googlegroups.com
On Mon, 23 Mar 2015 06:22:19 -0700 (PDT)
ka...@quipsy.de wrote:

> We are two git *newbees *facing trouble with git fetch and git daemon
> on Windows 7.
>
> We are using MSYSGIT 1.9.5 and "git bash" on Windows 7 Pro SP1 (64
> Bit).
>
> git daemon is started on our two PCs to allow me and my buddy to
> synchronize our work. Firewalls have TCP port 9418 open. All over the
> last days we could perfectly fetch each other's commits using git
> fetch my-buddy.* Since today it does not work anymore, but we have
> not changed anything!*
[...]

Pushing via plain git protocol is known to have issues on Windows
(which are very hard to solve).

Instead of trying to fix it, I'd suggest you just make a bare
repository on one of your machines, turn that directory into a network
share and then perform the usual dance of making sure that share can be
accessed in R/W mode by the required user on another machine (and only
that user!).

Then use the //server/share or file:///server/share as an URL for
accessing the repo from the other machine. The machine hosting the
bare repository can use normal "local" URLs to access it -- like
C:/path/to/that/repo.

Markus Karg

unread,
Mar 26, 2015, 4:09:51 AM3/26/15
to Johannes Schindelin, msy...@googlegroups.com
Johannes,

this means we have to build git from scratch? What tool chain do we need to install for this, and isn't there work in progress for a fix on behalf of the msysgit authors?

Thanks
-Markus


-----Ursprüngliche Nachricht-----
Von: Johannes Schindelin [mailto:johannes....@gmx.de]
Gesendet: Montag, 23. März 2015 17:08
An: Markus Karg
Cc: msy...@googlegroups.com
Betreff: Re: [msysGit] fatal: read error: Invalid argument

Markus Karg

unread,
Mar 26, 2015, 4:27:13 AM3/26/15
to Konstantin Khomoutov, msy...@googlegroups.com
I didn't know that git remotes can be addresses by CIFS paths! Thanks for that tip! I'll try out right not! :-)

-----Ursprüngliche Nachricht-----
Von: Konstantin Khomoutov [mailto:flat...@users.sourceforge.net]
Gesendet: Dienstag, 24. März 2015 13:20
An: Markus Karg
Cc: msy...@googlegroups.com
Betreff: Re: [msysGit] fatal: read error: Invalid argument

Johannes Schindelin

unread,
Mar 26, 2015, 5:14:13 AM3/26/15
to Markus Karg, msy...@googlegroups.com
On 2015-03-26 09:09, Markus Karg wrote:

> this means we have to build git from scratch? What tool chain do we
> need to install for this, and isn't there work in progress for a fix
> on behalf of the msysgit authors?

The beauty of the net installer is that it installs the entire toolchain
for you (portable; no registry changes) and builds Git.

But the easiest solution for you would be as suggested by Konst: go for
the shared directory.

Markus Karg

unread,
Mar 26, 2015, 6:28:00 AM3/26/15
to Konstantin Khomoutov, msy...@googlegroups.com
Thanks for your tip! It really works like a charm out of the box! :-)

-----Ursprüngliche Nachricht-----
Von: Konstantin Khomoutov [mailto:flat...@users.sourceforge.net]
Gesendet: Dienstag, 24. März 2015 13:20
An: Markus Karg
Cc: msy...@googlegroups.com
Betreff: Re: [msysGit] fatal: read error: Invalid argument

Markus Karg

unread,
Mar 26, 2015, 6:29:00 AM3/26/15
to Johannes Schindelin, msy...@googlegroups.com
Sounds great, but as we have it running using CIFS now, chances are pretty low that we really look into building a patched git for the sake of bug fixing, unfortunately...


-----Ursprüngliche Nachricht-----
Von: Johannes Schindelin [mailto:johannes....@gmx.de]
Gesendet: Donnerstag, 26. März 2015 10:14
An: Markus Karg
Cc: msy...@googlegroups.com
Betreff: Re: AW: [msysGit] fatal: read error: Invalid argument
Reply all
Reply to author
Forward
0 new messages