org.eclipse.jgit.util.FS : Cannot save config file 'FileBasedConfig[Y:.config\jgit\config]'

Answered

I am seeing a strange error when I started to run my code (Java SpringBoot API) and start the Tomcat server in my IntelliJ tool: 

 

023-09-19 11:48:04.944 ERROR 25640 --- [tributeWriter-2] org.eclipse.jgit.util.FS : Cannot save config file 'FileBasedConfig[Y:.config\jgit\config]'

java.io.IOException: Creating directories for Y:.config\jgit failed
at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:412) ~[org.eclipse.jgit-5.13.1.202206130422-r.jar:5.13.1.202206130422-r]
at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:140) ~[org.eclipse.jgit-5.13.1.202206130422-r.jar:5.13.1.202206130422-r]
at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:220) ~[org.eclipse.jgit-5.13.1.202206130422-r.jar:5.13.1.202206130422-r]
at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:762) ~[org.eclipse.jgit-5.13.1.202206130422-r.jar:5.13.1.202206130422-r]
at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$5(FS.java:444) ~[org.eclipse.jgit-5.13.1.202206130422-r.jar:5.13.1.202206130422-r]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
 

wondering if anyone has a fix on this error, looks like to me it is an IntelliJ tooling issue.

0
14 comments

Where do you see these errors?

What if you start your spring boot project outside the IDE, from the terminal via maven/gradle? Do you get the same errors?

0

Hi Serge, Thanks for responding. I got this error in IntelliJ when I started my application by clicking on the blue circled run button. If I run outside of IntelliJ  ./gradlew bootRun, I will get a different error (  but this error is not what I am concerned about for now), but I don't get this (org.eclipse.jgit.util.FS : Cannot save config file 'FileBasedConfig[Y:.config\jgit\config]'). My thought is: when IntelliJ starts my app, it calls org.eclipse.jgit.util.FileUtils.mkdirs trying to make a directory out of my Y: ( private network drive), and failed. If there was a setting for me to direct org.eclipse.jgit.util.FileUtils.mkdirs to make a directory in my C:, the issue might be resolved. Not sure where to change this setting to save to C: instead of Y:

0

What IDE version do you use? Do you have settings sync enabled?

https://youtrack.jetbrains.com/issue/IDEA-302344/Dont-read-global-Git-config-for-operations-with-settings-sync may be related.

Does it still happen in 2023.2.2 release: https://www.jetbrains.com/idea/download/index.html?

If the issue persists, please file a new bug at https://youtrack.jetbrains.com/newIssue?project=IDEA and attach the logs (Help | Collect Logs and Diagnostic Data).

0

I am using  IntelliJ IDEA 2023.2.1 (Ultimate Edition). What is the settings sync? I can try to upgrade to 2023.2.2 and see 

0

If update doesn't help, please file a bug with the logs.

Settings sync: https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html

0

can you explain what is the purpose of the settings sync and why it can possibly help the current issue? the link you shared has a long reading it will take some of my time to understand and then decide whether to do it or not. At the same time I am trying to upgrade to a higher version of the IntelliJ, and there is no clear and easy way to tell me click on this button and then you can upgrade

 

0

There was a bug related to settings sync. When enabled, it used JGit to access some files that could be blocked. This bug was fixed in 2023.2, so your issue is likely different.

0

Is there an easy way to check if I have enabled setting sync in my IDE?

0

In my case I didn't think I have settings sync enabled: as I am working in a corporation and I didn't need to have an account.

 

0

Waiting for the logs to investigate further.

Just make sure this code belongs to IntelliJ IDEA and not to your Spring Boot app.

0

The code is not my code as there is nowhere in my code referencing org.eclipse.jgit.*

0

So, Interestingly, I upgraded the IDE to IntelliJ IDEA 2023.2.2, synced the gradle, and then ran, and the error was gone. So great. Thanks for your help.

Another interesting thing is, that I then ran the older version of IntelliJ IDEA 2023.2.1, hoping to get the error and error log to you, but this time the errors were also gone. So not sure, something is messed up it seems :) 

 

Now it is working so I am fine. If you still need the log, we will have to meet … Let me know.

0

Please sign in to leave a comment.