I have two servers set up (as far as I know) exactly the same. On one of them, committing with git has always been fine, however on the second one, I've started getting this error:
fatal: The remote end hung up unexpectedly
error: error in sideband demultiplexer
Everything is the same between the two, including the contents of the .git/hooks/post-receive
file.
Is there a step in configuration I've missed somewhere, or something? I've tried reinitialising the repo twice now, to no avail.
My post-receive file is as follows:
#!/bin/sh
cd ..
env -i git reset --hard
On this GitHub support thread, this kind of error seems to be related to a repository corruption of some kind.
The issue was fixed by resetting the head of the corrupt remote repo (with git remote set-head
).
In your hook, you never read from stdin. So probably the solution of this question works for you, too: Error in sideband demultiplexer with a git post-receive hook
I get this error when git
is prevented from MMAPing memory (due to a limit on the process).
On 64-bit architecture, git will attempt to mmap 1G of memory, which is surprisingly large and may cause issues if you're using ulimit
(or chpst
/ softlimit
) to control processes.
Removing the memory limit fixes things (for me).
i had the same issue. and for me, it was because of my post-receive python script. if there is any error in my python script, then i get always the error message:
fatal: The remote end hung up unexpectedly
error: error in sideband demultiplexer
来源:https://stackoverflow.com/questions/4582849/git-responds-with-error-in-sideband-demultiplexer