Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hook not being invoked!

naveendennis August 25, 2014

I tried the "External Hooks" addon my Stash installation but doesn't matter what I do the hook(pre-receive) is not detected and the stash server rejects all pushes.

My hook simply has...

#!/bin/sh
echo "Hello World"

...and is present in the hooks directory inside my repository. In the executable field, I tried the following values "hooks/pre-receive.sh", "/hooks/pre-receive" and even the obsolute path in my PC but It is never triggered and the pushes are always rejected.

Am I missing something?

Do specify if you need more information.

1 answer

0 votes
Anna Mihailovskaya September 3, 2014

Hi!

You forgot to add execution rights. That will help:

chmod +x /path/to/hook

naveendennis September 9, 2014

Hi! Where should I add this permission? Should I do that in the script body?

Anna Mihailovskaya September 9, 2014

Hello! At first, your executable (file with script) must be placed on stash-server. And as it names executable, you should give it proper rights. Then you provide hook-plugin path to that script.

naveendennis September 10, 2014

I don't want to sound naive But this chmod +x /path/to/hook command is to be executed in Stash, right?

naveendennis September 10, 2014

Also, the path that was mentioned. Is it an absolute path in the server or relative path in the server

Anna Mihailovskaya September 10, 2014

>this chmod +x /path/to/hook command is to be executed in Stash, right? Execute this command on your stash-server. >Is it an absolute path in the server or relative path in the server For me worked absolute path.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events