Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带有git post接收挂钩的边带解复用器出错_Git_Apache_Hook_Githooks - Fatal编程技术网

带有git post接收挂钩的边带解复用器出错

带有git post接收挂钩的边带解复用器出错,git,apache,hook,githooks,Git,Apache,Hook,Githooks,我用git设置了一个EC2实例,并使用post-receive钩子将其部署到我的服务器上。这是我的控制台的输出: $ git push production master git@example.com's password: Counting objects: 26, done. Delta compression using up to 4 threads. Compressing objects: 100% (19/19), done. Writing objects: 100% (19/

我用git设置了一个EC2实例,并使用post-receive钩子将其部署到我的服务器上。这是我的控制台的输出:

$ git push production master
git@example.com's password:
Counting objects: 26, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (19/19), 2.51 KiB, done.
Total 19 (delta 14), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
error: error in sideband demultiplexer
To git@184.169.147.123:halftown.git
   5d5e809..eb30e51  master -> master
error: failed to push some refs to 'git@example.com:git_application.git'

如果您需要任何其他帮助来解决此问题,请告诉我。

我已经解决了我遇到的问题。显然,在完成脚本之前,您必须确保阅读了STDIN中的所有内容

这是我以前的帖子:

#!/bin/sh
git checkout -f
这就是我补充的解决问题的方法:

#!/bin/sh
while read oldrev newrev refname
do
:
done
git checkout -f

可能是复制品我原本以为是复制品,但是重置头部并没有修复它。我认为我的问题是让钩子读标准文本。无论你用什么语言写钩子,只要确保你先读标准文本。