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

External Hook executes but does't return any remote output

The external hook plugin works and executes as expected but doesn't return any output via git remote

I am just trying to do some post operations but I want those remote operations to be visible to the users.

~/git/stash-test $ git push origin master
Counting objects: 13, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 292 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
   5bfd072..661a51e  master -> master
        echo "Script name: $0"
        echo "Positional arguments: ${@}"
        while read from_ref to_ref ref_name; do
                echo "Ref update:"
                echo " Old value: $from_ref"
                echo " New value: $to_ref"
                echo " Ref name:  $ref_name"
                echo " Diff:"
                git show $to_ref | sed 's/^/  /'
) | tee -a /tmp/external-hooks-test.log
Script name: /opt/
Positional arguments: test_param
STASH_USER_NAME: matt.trisoline
STASH_REPO_NAME: stash-test
Ref update:
 Old value: 5bfd07267a472b56c8392aa0c97ef9f971619aa3
 New value: 661a51efdb350d1a4a00722c654b1cfb96771502
 Ref name:  refs/heads/master
  commit 661a51efdb350d1a4a00722c654b1cfb96771502
  Author: Matthew Trisoline <>
  Date:   Mon Oct 27 17:26:17 2014 -0400
  diff --git a/bang b/bang
  index db791df..a3af400 100644
  --- a/bang
  +++ b/bang
  @@ -1,4 +1,3 @@

1 answer

Please, read section in about configuration.

Currently, Stash run all post-receive asynchronously, so it's Stash limitation. Currently there is no way to get output from post-receive hook.

However, you can give feedback to user in pre-receive hook, it will receive all data that post-receive hook can receive, so it's should be no problem.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Europe

Daniel Meisen, kreuzwerker, Video and Slides online

Video and slides from this week's Monday Night Special are online. Learn more about the differences between Atlassian Server/Data Center and Atlassian Cloud from Daniel Meisen, kreuzwerker, and find ...

6 views 0 0
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