How to create a server side hook in Bitbucket cloud?

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!

Regards,

Thomas

2 answers

So almost 1 year later, nobody can answer this?

0 votes

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
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

434 views 6 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you