Thx到这http://danbarber.me/using-git-for-deployment/伟大的文章我设法有一个远程服务器在git控制下。不幸的是我不得不改变服务器。无法运行挂接/更新后:没有这样的文件或目录
现在完成在教程的所有步骤和运行
git push origin master
后,我得到:
error: cannot run hooks/post-update: No such file or directory
To [email protected]:../var/git/myproject.git
我已经试过很多次和变化。我换成
#!/bin/sh
为
#!/bin/bash
阅读Git - remote: error: cannot run hooks/post-receive: No such file or directory
反正据我检查(多次)之后的路径是正确的。
我想知道为什么说:../ var而不是:/ var,但我不知道这是从哪里来的。
有关如何使这项工作再次的任何建议?
你可以发布'ls .git/hooks'和'cat .git/hooks/post-update'的输出吗? – 2014-10-08 13:23:41
在服务器上运行'ls -l .git/hooks'。确保'更新后'脚本是可执行的。确保'.git'和'.git/hooks'目录的权限是正确的。 – 2014-10-08 13:41:00
'#!'行上的回车符? http://serverfault.com/questions/592702/no-such-file-or-directory-error-when-trying-to-execute-startup-script-in-debian – 2014-10-08 14:06:39