Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-10609

Hooks are not being called when core.hookspath is configured in system or user level git config file

    XMLWordPrintable

    Details

      Description

      Symptoms

      • Pull requests are not being updated when the source or target branch is updated
      • Configured repository hooks are not being enforced when updates are pushed to a repository
      • Branch permissions are not being enforced when updates are pushed to a repository

      The atlassian-bitbucket.log contains this message:

      2018-02-08 10:17:33,857 WARN  [http-nio-7990-exec-9] admin @X98WX6x617x66x0 127.0.0.1 "POST /scm/test/test.git/git-receive-pack HTTP/1.1" c.a.s.i.s.g.p.http.HttpReceivePack TEST/test[1]: Git hooks have not been called. Please verify that the hooks are configured correctly - see https://confluence.atlassian.com/display/BITBUCKETSERVERKB/Git+hook+scripts+are+not+executing?utm_campaign=in-app-help&utm_medium=in-app-help&utm_source=stash for details
      

      Summary
      The symptoms described above indicate that the repository hooks in Bitbucket's repositories are not being called. This can have a variety of reasons (e.g. hooks being manually overwritten, hooks not being executable). More information about possible causes and ways to resolve them can be found in this Knowledge Base article.

      This problem also occurs when the core.hooksPath setting (supported in git 2.9 and higher) is configured in the ~/.gitconfig file of the Bitbucket (service) user, or in the system-wide /etc/gitconfig configuration file, Bitbucket Server's repository hooks are no longer called.

      Bitbucket should override the core.hooksPath setting in its shared/config/git/system-config to ensure its own hooks are called.

      Workaround
      Remove the core.hooksPath setting from the Bitbucket user's ~/.gitconfig and/or the system-wide /etc/gitconfig.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mheemskerk Michael Heemskerk
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: