Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Hook not being invoked!

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

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?

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.

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

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

>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
Community showcase
Posted in Industry Groups

🤖 A Jira Senior Developer's thoughts on remote pair programming

Hello, Tech enthusiasts! Are you ready for October to begin 🙀? I wanted to share with you an Article I came across from Work/Life (The Atlassian blog) from  a senior developer on the Jira te...

36 views 1 2
View post

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you