a clean fresh new bitbucket server
user:admin
home:/home/admin/atlassian/home
project and repository create
repository id:3
add a git hook script in directory:
/home/admin/atlassian/home/shared/data/repositories/3
admin@local$ tree hooks/
hooks/
├── post-receive
├── post-receive.d
│ └── 20_bitbucket_callback
├── pre-receive
└── pre-receive.d
├── 20_bitbucket_callback
└── 21_test
the [21_test] is the new script:
```
#!/usr/bin/env bash
echo "test"
exit 1
```
and the permission is fixed and checked:
admin@local$ ll
total 8
-rwxrwxr-x. 1 admin admin 416 Oct 3 19:21 20_bitbucket_callback
-rwxrwxr-x. 1 admin admin 41 Oct 3 19:23 21_test
but the output application.xml from support zip file is:
<repository>
<id>3</id>
<slug>test</slug>
<name>test</name>
<type>git</type>
<approximate-size>Unknown</approximate-size>
<state>AVAILABLE</state>
<status-message>Available</status-message>
<marked-public>false</marked-public>
<is-public>false</is-public>
<is-fork>false</is-fork>
<is-remote>false</is-remote>
<partition>-1</partition>
<available>true</available>
<branch-model>
<inherited>true</inherited>
<development-refId>refs/heads/master</development-refId>
</branch-model>
<jira-commit-checker/>
<repository-hooks/>
<pull-requests>
<open-pull-requests>0</open-pull-requests>
<merged-pull-requests>0</merged-pull-requests>
<declined-pull-requests>0</declined-pull-requests>
</pull-requests>
<git-lfs>
<enabled>false</enabled>
</git-lfs>
<configured-hook-scripts/>
</repository>
no git hook scripts detected and the hooks not work of course
i checked some docs like:
https://confluence.atlassian.com/bitbucketserverkb/git-hook-scripts-are-not-executing-779171211.html
but nothing worked ever
how could i get the hooks work?
anybody could help me somehow?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.