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.
Hi!
You forgot to add execution rights. That will help:
chmod +x /path/to/hook
Hi! Where should I add this permission? Should I do that in the script body?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't want to sound naive But this chmod +x /path/to/hook command is to be executed in Stash, right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, the path that was mentioned. Is it an absolute path in the server or relative path in the server
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.