git - 使用 git post-receive hook 的边带解复用器出错

标签 git apache hook githooks

我已经使用 git 设置了我的一个 EC2 实例,并使用了一个接收后 Hook ,我使用 this tutorial 将它部署到我的服务器上.这是我的控制台的输出:

$ 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 读取所有内容。

这是我之前的接收后 Hook :

#!/bin/sh
git checkout -f

这是我添加的解决问题的方法:

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

关于git - 使用 git post-receive hook 的边带解复用器出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9592908/

相关文章:

git - 如何在 github 上托管我的网站

git - 如果超过一组特定的行发生更改,如何让 git 仅识别文件已更改?

c++ - 调用 SetWindowsHookEx 指向的方法

java - localhost :8080/lio/works great in my apachtomcat. 但是当我输入 <my ip>:8080/lio/i 时出现错误

php - CodeIgniter post_controller_constructor Hook 运行两次?

windows - 如何 Hook Windows 中的所有新进程

git show 文件一段时间内没有变化

Git pull 恢复了 master 中的提交?

java - 如何使用多个参数调用 HTTP POST 请求?

arrays - 数组与 Hive 相交