Git responds with 'error in sideband demultiplexer'

谁说胖子不能爱 提交于 2019-11-27 02:09:32

问题


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


回答1:


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).




回答2:


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




回答3:


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




回答4:


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).



来源:https://stackoverflow.com/questions/4582849/git-responds-with-error-in-sideband-demultiplexer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!