Hello Team,
I am facing an issue with Bitbucket pre‑receive hooks in our UAT environment. Despite configuring the hook settings, the scripts are not being executed during git push.
Bitbucket version: 9.4.8 data centre
Configuration in bitbucket.properties:
plugin.hook-scripts.enabled=true(the single‑script property has been commented out)
Hook script path:
/app/bitbucket/atlassian/application-data/shared/hooks/pre-receive.d/10_jira_check.shPermissions: Script is owned by bitbucket user and marked executable (chmod +x).
Restart performed using bundled scripts (stop-bitbucket.sh / start-bitbucket.sh).
Test script with simple echo + exit 1 does not trigger; pushes succeed silently.
No relevant hook execution logs found in atlassian-bitbucket.log.
Impact: We are unable to enforce commit message validation (JIRA ID checks) as intended.
Hi Namrata,
It seems you recently upgraded your Bitbucket DC from version <7.x
You’ve hit a breaking change between 7.x and 8.x+.
On Bitbucket Data Center 9.4.8, the old “file system” hook scripts under .../hooks/pre-receive.d/ are no longer executed—the plugin.hook-scripts.enabled=true flag only controls the new hook‑scripts plugin, and those scripts must be managed via REST / Bitbucket UI, not by dropping files directly into pre-receive.d.
Atlassian doc that matches your case:
https://support.atlassian.com/bitbucket-data-center/kb/how-to-execute-pre-receive-hook-after-upgrading-bitbucket-server-from-7x-to-8x-version/
and updated hook behaviour:
https://support.atlassian.com/bitbucket-data-center/kb/how-to-create-a-simple-hook-in-bitbucket-data-center/
Path you’re using:
/app/bitbucket/atlassian/application-data/shared/hooks/pre-receive.d/10_jira_check.shThis is the legacy mechanism (pre‑8.0) where Bitbucket would execute scripts from hooks/pre-receive.d.
Since 8.0, those legacy scripts are deprecated and not invoked for pushes. The engine now reads scripts from BITBUCKET_HOME/shared/config/hooks-scripts and from DB metadata, controlled via REST.
Same is covered in the KB:
https://support.atlassian.com/bitbucket-data-center/kb/how-to-execute-pre-receive-hook-after-upgrading-bitbucket-server-from-7x-to-8x-version/
So your test echo && exit 1 never runs, which is why git push succeeds, and you see no entries in atlassian-bitbucket.log.
We hope the information provided is helpful.
Cheers,
Mehul Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.