Post-receive test" 推送到我的远程存储库时未执行。 远程是ssh://user@server:2-6ren">
gpt4 book ai didi

linux - Git post-receive 钩子(Hook)未执行

转载 作者:太空宇宙 更新时间:2023-11-04 05:01:39 25 4
gpt4 key购买 nike

以下post-receive Hook :

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

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

远程是ssh://user@server:2222/home/git/repo.git(它是一个虚拟机)并且可以工作,因为当我手动 checkout 它时,我会看到我所做的修改。

一些附加信息...

$ 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钩子(Hook)不被执行?

最佳答案

Hook 文件被错误地命名为post-reveive

关于linux - Git post-receive 钩子(Hook)未执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30847329/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com