我已经使用 git 设置了一个 EC2 实例,并使用 post-receive hook 将其部署到我的服务器本教程。这是我的控制台的输出:
$ git push production master
[email protected]'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 [email protected]:halftown.git
5d5e809..eb30e51 master -> master
error: failed to push some refs to '[email protected]:git_application.git'
如果您需要其他任何信息来帮助我解决此问题,请告诉我。
我已经弄清楚了我遇到的问题。显然,您必须确保在完成脚本之前从 STDIN 读取所有内容。
这是我之前的接收后挂钩:
#!/bin/sh
git checkout -f
这是我添加的解决问题的内容:
#!/bin/sh
while read oldrev newrev refname
do
:
done
git checkout -f
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)