org.eclipse.jgit.util.FS fatal: Could not switch to <git installation>/git/etc/ No such file or directory
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Problem
Following entries constantly repeat in Bitbucket server logs
1
org.eclipse.jgit.util.FS fatal: Could not switch to '<git>/etc/' No such file or directory
or
1
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
Cause
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
Resolution
Create the missing directory reported in log e.g. /usr/local/git/etc/
Was this helpful?