I recently moved a Bitbucket Server instance to a new machine using the supported process (which actually went perfectly, rather impressed!) from a Windows machine to a Linux one.
After migrating the repositories the execute permissions were not set on the hooks in the BITBUCKET_HOME\shared\data\repositories\xx\hooks\ directory, which I have updated as per this article but they are still throwing the error:
@VJPR66x1044x4763x0 1n4f9dv 10.xx.xx.xx SSH - git-receive-pack '/prj/deploytest.git' c.a.s.i.s.g.p.ssh.SshReceivePack PRJ/deploy-test[28]: Git hooks have not been called. Please verify that the hooks are configured correctly - see https://confluence.atlassian.com/display/BITBUCKETSERVERKB/Git+hook+scripts+are+not+executing?utm_campaign=in-app-help&utm_medium=in-app-help&utm_source=stash for detail
If I create a new repository from scratch the hooks work fine, but for older repositories that I have added the execute permission on they will not trigger.
I have gathered the support bundle zip and I notice that for the newly created repository it shows
<repository-hooks>
<hook>
<key>com.atlassian.stash.plugin.stash-web-post-receive-hooks-plugin:postReceiveHook</key>
<config>true</config>
</hook>
</repository-hooks>
<git-hooks>
<hook>
<name>pre-receive</name>
<size>430 B</size>
<executable>true</executable>
<callbacks>
<callback>
<name>20_bitbucket_callback</name>
<size>416 B</size>
<executable>true</executable>
</callback>
</callbacks>
</hook>
<hook>
<name>post-receive</name>
<size>432 B</size>
<executable>true</executable>
<callbacks>
<callback>
<name>20_bitbucket_callback</name>
<size>418 B</size>
<executable>true</executable>
</callback>
</callbacks>
</hook>
</git-hooks>
While the affected repository shows:
<git-hooks>
<hook>
<name>pre-receive</name>
<size>430 B</size>
<executable>true</executable>
<callbacks>None</callbacks>
</hook>
<hook>
<name>post-receive</name>
<size>432 B</size>
<executable>true</executable>
<callbacks>None</callbacks>
</hook>
</git-hooks>
So the callbacks are set to None, despite the fact that the 20_bitbucket_callback files are present under both pre-receive and post-receive.
Is there any way that I can get the repository to pick up the callbacks value again?