I'm new to creating git hooks. I've successfully created a local git hook but I am having a hard time figuring out how to install a server side hook on Bitbucket.
I've tried using a plugin called External Hooks and making a External Pre Receive Hook, but that results in my push to Bitbucket being rejected with:
remote: Hook external-pre-receive-hook blocked the push ! [remote rejected] master -> master (pre-receive hook declined).
I've tried putting the hook in the .git folder on the server. But there's not a .git folder that I can find. I did find ApplicationData/Bitbucket/bin/git-hooks. I tried putting a pre-receive hook file in there but that was not successful. It did not prevent a push to the repo but the file also did not execute.
The hook/file that I'm using is as simple as can be so I don't think thats the problem. It has this text:
#!/bin/sh
#
echo 'hi there soldier'