Bitbucket Server fails to start on Windows with error "IllegalStateException: Could not find GNU bash; hook scripts will not work"
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
症状
The following error is reported when starting up Bitbucket Server on Windows:
Caused by: java.lang.IllegalStateException: Could not find GNU bash; hook scripts will not work
at com.atlassian.stash.internal.hook.script.WindowsHookScriptCommandLineFactory.lambda$findBash$0(WindowsHookScriptCommandLineFactory.java:100)
at java.util.Optional.orElseThrow(Unknown Source)
at com.atlassian.stash.internal.hook.script.WindowsHookScriptCommandLineFactory.findBash(WindowsHookScriptCommandLineFactory.java:100)
... 5 common frames omitted
原因
This error occurs because one of these things is true:
- An unsupported version of Git is installed, and GNU bash is part of "Git for Windows" installation.
- Windows cannot find the bash executable in the system
PATH
.
ソリューション
- For cause #1: Install a supported version of Git for Windows.
- For cause #2:
- Make sure that the absolute paths of the git and the bash executables are found in the system
PATH
variable
or
Alternatively, configure the path to the executables directly in<BITBUCKET_HOME>\shared\bitbucket.properties
:hookscripts.path.shell=C:\absolute\path\to\bash.exe
plugin.bitbucket-git.path.executable=C:\absolute\path\to\git.exe
- Make sure that the
atlbitbucket
user is listed a member of the local administrator's group.
- Make sure that the absolute paths of the git and the bash executables are found in the system
Lastly, restart Bitbucket so that the changes are picked.
最終更新日 2021 年 9 月 27 日
Powered by Confluence and Scroll Viewport.