-
Notifications
You must be signed in to change notification settings - Fork 17
Tutorial for Bitbucket Server administrators
Bitbucket Server is a proprietary Git server made by Atlassian. It doesn't support the standard Git hooks natively. Instead, it supports its own hooks which are implemented in Java as plugins.
The commercial plugin External Hooks allows you to use standard pre-receive
and post-receive
Git hooks with Bitbucket.
Follow the plugin installation and configuration instructions to enable it for particular repositories. The plugin must be configured with an executable, which can be our usual githooks.pl
script.
Bibucket git repositories are kept in the server but are not easy to locate, because they're named after a numeric ID. In order to locate the repository directory in the server, go to its repository details page in the repository settings section in Bitbucket's web interface. The page shows the repository's location on disk where you find the config file which you must edit to configure Git::Hooks plugins.
Note that as of April, 2018, the External Hooks plugin's latest version (4.3) has an issue which prevents it to work with Git 2.11 or newer. Until this problem is fixed you have to make Bitbucket use Git 2.10 or older. You can specify which Git to use by defining the plugin.bitbucket-git.path.executable option in the Bitbucket Server config properties file.