在一个Git边解复用器错误后收到钩 [英] Error in sideband demultiplexer with a git post-receive hook

查看:202
本文介绍了在一个Git边解复用器错误后收到钩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经与我的Git的EC2实例之一,使用后收到钩我把它部署到我的服务器的本教程。这是我的控制台输出:

I have set up one of my EC2 instances with git and using a post-receive hook I have it deploying to my server with this tutorial. This is the output from my console:

$ 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'

请让我知道如果你需要任何东西来帮助我解决这个问题。

Please let me know if you need anything else to help me resolve this issue.

推荐答案

我已经想通了,我是有这个问题。显然,你必须确保你在完成脚本之前阅读一切从标准输入。

I have figured out the problem that I was having. Apparently, you have to make sure you read everything from STDIN before completing the script.

这是我的后收到钩前:

#!/bin/sh
git checkout -f

这是我补充说,解决了这个问题:

This is what I added that solved the problem:

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

这篇关于在一个Git边解复用器错误后收到钩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆