【问题标题】:Git post-receive hook is not executedGit post-receive 挂钩未执行
【发布时间】:2015-08-31 01:49:46
【问题描述】:

以下post-receive钩子:

#!/bin/bash
echo "-> Post-receive test"

在推送到我的远程存储库时未执行

遥控器是ssh://user@server:2222/home/git/repo.git(它是一个虚拟机)并且可以正常工作,因为当我手动签出它时,我看到了我所做的修改。

一些附加信息...

$ ls -al /home/git
drwxr-xr-x  7 git  git  4096 juin  15 15:40 repo.git

$ ls -al /home/git/repo.git/hooks
-rwxr-xr-x  1 git  git  117  juin  15 15:40 post-reveive

一切似乎都已经到位,然而,当我按下遥控器时,没有任何post-receive 正在执行的痕迹:

Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 301 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To ssh://user@server:2222/home/git/repo.git
   6c385f4..d368bf9  master -> master

为什么不执行 post-receive 挂钩?

【问题讨论】:

  • 你想要post-commit git-scm.com/book/zh/v2/…
  • @Ôrel post-receive 钩子是我正在寻找的,它只是没有被执行!让它在另一台服务器上工作,这就是为什么我不明白为什么它在这里不起作用..
  • ls 显示您将文件命名为 post-reveive
  • @Kristján 该死的人......花了几乎一天的时间。谢谢你。我不能再面对网络了,太丢脸了。

标签: linux git githooks git-post-receive


【解决方案1】:

挂钩文件被错误命名为post-reveive

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-18
    • 1970-01-01
    • 2013-02-02
    • 2012-01-02
    • 2014-05-13
    • 2014-10-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多