post-commit git hook script not working as expected in JBoss BPM Suite 6 in Windows environment

Solution Verified - Updated -


  • Red Hat JBoss BPM Suite (BPMS)
    • 6.3
    • 6.4
  • Red Hat JBoss BRMS (BRMS)
    • 6.3
    • 6.4


  • User is trying to update the remote GIT repository when they save the code/rules from business-central repository project as per the article mentioned here How to configure git hooks in B*MS 6.2 . The operating system used in this scenario is Windows 7 and the requirement is to push the commits automatically by using Git hooks. In the process it is observed that the post-commit hook is not running as expected but, when user runs the command manually then all the commits are posted to the repository properly. Is there any specific action that needs to be performed to achieve it in Windows environment?
  • How to set post-commit git hook script for BPM Suite in Windows environment;


  • For Windows environment this issue can be fixed after installing Git client and Cygwin (for windows) like softwares and ensure that the installation path (e.g. /bin directory) is properly set in Windows environment's PATH variable (e.g. C:/cygwin/bin). Also make sure to not add extensions to the post-commit script such as .bat.
  • If the above does not work out even after having a GIT client and Cygwin already installed on the Windows system the users can try out following options to test if it works.
    1. Remove Github and other Git clients (if installed already) on the Windows system.
    2. Make sure to delete the Git folder manually if it is not deleted.
    3. Also delete the contents of the Github folder in the O.S. user's C:\Users\<USER_NAME>/AppData/Local and C:\Users\<USER_NAME>/AppData/Roaming directories.
    4. Install Git freshly into the default location.
    5. Add the following to the existing PATH system variable (the directory structure is given for demonstration only):
C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\libexec\git-core;

Root Cause

In Windows OS git hooks requires Cygwin installed to work properly.

Diagnostic Steps

  • Check java.library.path in server.log to make sure that Cygwin is on PATH and JBoss EAP has identified it;
  • Check if post-commit script has any extension (such as bat, exe, etc). If so, rename the file to post-commit only;

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.