Git 以“边带解复用器中的错误”作为响应

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4582849/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 04:53:32  来源:igfitidea点击:

Git responds with 'error in sideband demultiplexer'

gitcorruption

提问by EJay

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:

我有两台服务器设置(据我所知)完全相同。在其中一个上,使用 git 提交一直很好,但是在第二个上,我开始收到此错误:

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

两者之间的一切都相同,包括.git/hooks/post-receive文件的内容。

Is there a step in configuration I've missed somewhere, or something? I've tried reinitialising the repo twice now, to no avail.

有没有我在某处错过的配置步骤,或者什么?我现在尝试重新初始化 repo 两次,但无济于事。

My post-receive file is as follows:

我的接收后文件如下:

#!/bin/sh
cd ..
env -i git reset --hard

#!/bin/sh
cd ..
env -i git reset --hard

采纳答案by VonC

On this GitHub support thread, this kind of error seems to be related to a repository corruptionof some kind.

在这个GitHub 支持线程上,这种错误似乎与某种存储库损坏有关。

The issue was fixed by resetting the head of the corrupt remote repo (with git remote set-head).

该问题已通过重置损坏的远程存储库的头部(使用git remote set-head)来解决。

回答by Martin Nyolt

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

在你的钩子里,你永远不会从标准输入中读取。因此,这个问题的解决方案可能也适用于您:带有 git post-receive hook 的边带解复用器中的错误

回答by jung

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:

我遇到过同样的问题。对我来说,这是因为我的 post-receive python 脚本。如果我的 python 脚本中有任何错误,那么我总是收到错误消息:

fatal: The remote end hung up unexpectedly
error: error in sideband demultiplexer

致命:远端意外挂断
错误:边带解复用器错误

回答by Ben Walding

I get this error when gitis prevented from MMAPing memory (due to a limit on the process).

git阻止 MMAPing 内存时(由于进程限制),我收到此错误。

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.

在 64 位架构上,git 将尝试映射 1G 内存,这非常大,如果您使用ulimit(或chpst/ softlimit) 来控制进程,可能会导致问题。

Removing the memory limit fixes things (for me).

删除内存限制可以解决问题(对我来说)。