Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

how to enable git server hooks in 8.4.1

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

https://confluence.atlassian.com/bitbucketserverkb/how-to-create-a-simple-hook-in-bitbucket-server-779171711.html

 

but nothing worked ever

how could i get the hooks work?

1 answer

anybody could help me somehow?

QQ图片20221008093402.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events