post-receive hook exit with code 1

32 views
Skip to first unread message

Антон Щорс

unread,
Jul 18, 2016, 4:07:39 PM7/18/16
to scmmanager
Hi!

I got this it /var/lib/scm/repositories/git/project/hooks/post-receive:

#!/bin/sh

echo
echo "**** Prime update [Hub's post-update hook]"
echo

cd $HOME/www || exit
unset GIT_DIR
git pull hub master

exec git update-server-info

All paths are correct, but i have such record at log:

2016-07-18 23:03:33.914 [qtp2125323556-29] WARN  sonia.scm.web.GitFileHook - file hook /var/lib/scm/repositories/git/project/hooks/post-receive returned with exit code 1

And there is no update.

Its work well from command line - sh /var/lib/scm/repositories/git/project/hooks/post-receive is ok

**** Prime hub's post-update hook

remote: Counting objects: 5, done
remote: Finding sources: 100% (3/3)
remote: Getting sizes: 100% (4/4)
remote: Total 3 (delta 0), reused 3 (delta 0)
Unpacking objects: 100% (3/3), done.
 * branch            master     -> FETCH_HEAD
Updating 0a6fa84..53151df
Fast-forward
 index.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

What im doind wrong?

Thank you!

Антон Щорс

unread,
Jul 19, 2016, 3:15:02 AM7/19/16
to scmmanager
Sorry guys, i got an answer - wrong file owner.

вторник, 19 июля 2016 г., 0:07:39 UTC+4 пользователь Антон Щорс написал:
Reply all
Reply to author
Forward
0 new messages