It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create a server side hook in Bitbucket cloud?

Thomas Kilgus Aug 28, 2017

Hi there,

I would like to create a server-side pre-receive hook in one of my repositories, that rejects pushes with files larger than X MB. The common git way is to add the hook to .git\hooks and make a bare repository to clone from/push to. How can I achieve that in the Bitbucket cloud?

Thanks in advance!



2 answers

0 votes
Thomas Kilgus Jun 26, 2018

So almost 1 year later, nobody can answer this?

Matthew Russell Jul 24, 2018


Like Alex Mills likes this
0 votes
Matt McGinnis I'm New Here Nov 29, 2018

I believe the answer is "You can't".  If you want server side hooks, you must use Bitbucket Server, not Bitbucket Cloud.  Your only option is to create a webhook that calls an API endpoint that you create, that then calls the Bitbucket API (assuming the BB API can achieve what you want to achieve).

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,734 views 1 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you