org.eclipse.jgit.util.FS fatal: Could not switch to <git installation>/git/etc/ No such file or directory
プラットフォームについて: 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 は除く
問題
Following entries constantly repeat in Bitbucket server logs
org.eclipse.jgit.util.FS fatal: Could not switch to '<git>/etc/' No such file or directory
または
org.eclipse.jgit.util.FS Exception caught during execution of command '[git, config, --system, --edit]' in '/usr/local/bin', return code '128', error message 'fatal: Could not switch to '<git>/etc/': No such file or directory
原因
This is related to an issue that happens with JGit when git is compiled from source and appears in RedHat flavors of Linux.
You can read more on it at :https://bugs.eclipse.org/bugs/show_bug.cgi?id=476639
ソリューション
Create the missing directory reported in log e.g. /usr/local/git/etc/