Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot save config file FileBasedConfig[H:\.config\jgit\config]: java.io.IOException: Creating directories for H:\.config\jgit failed #1239

Closed
Crown0815 opened this issue Oct 10, 2022 · 7 comments
Labels
backend bug Something isn't working
Milestone

Comments

@Crown0815
Copy link

Running environment

  • Git Machete plugin version - 3.1.0
  • IDE - JetBrains Rider 2022.2.3
  • Operating system - Windows 10 10.0

IDEA - stack trace

Cannot save config file 'FileBasedConfig[H:\.config\jgit\config]'

java.io.IOException: Creating directories for H:\.config\jgit failed
	at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:413)
	at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:140)
	at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:184)
	at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:761)
	at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$5(FS.java:443)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

IDEA - additional info

N/A

Bug description

Please include steps to reproduce (like go to.../click on... etc.) + expected and actual behaviour.

(optional) Logs

Enable logging on DEBUG level for this plugin by adding

com.virtuslab

to the list under Help -> Diagnostic Tools -> Debug Log Settings.

Then reproduce a bug and attach the logs to the issue.

To find IntelliJ log file, go to Help -> Show Log in Files.

Consider placing the logs within the details (aka "spoiler") tags as the may be very extensive.

Logs Logs go here

(optional) Screenshots

If applicable, add screenshots (or screen recordings, see Peek on Linux)
to help explain your problem.

@PawelLipski
Copy link
Collaborator

Ouch seems that it's another such occurrence, after #805 ☹️

@PawelLipski PawelLipski changed the title com.intellij.diagnostic.IdeaReportingEvent$TextBasedThrowable Cannot save config file FileBasedConfig[H:\.config\jgit\config]: java.io.IOException: Creating directories for H:\.config\jgit failed Oct 10, 2022
@PawelLipski PawelLipski added the bug Something isn't working label Oct 10, 2022
@PawelLipski PawelLipski added this to the v3.1.1 milestone Oct 10, 2022
@PawelLipski
Copy link
Collaborator

PawelLipski commented Oct 10, 2022

@Crown0815 before we think of a more proper fix... could you first try the fix suggested in https://stackoverflow.com/a/66818045/2750812? I.e. setting up HOMEDRIVE and HOMEPATH to point to a place where your user has writing permissions (as apparently, your system user can't write directly under H:\)?

@PawelLipski
Copy link
Collaborator

Also... does it actually make the Git Machete plugin unusable in any way? or is it just a matter of exception being reported with no further consequences (esp. that the failing org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig call happens on a separate thread)?

@Crown0815
Copy link
Author

@PawelLipski I can write to H:\ without any issues. I'd like to keep the paths as they are, since other tools rely on some configs there (e.g., git itself).
It looks like the Git Machete plugin works fine. I am not an expert in the tool, but so far, anything I tried to do worked.

@PawelLipski
Copy link
Collaborator

It looks like the Git Machete plugin works fine. I

Okay, good to know 😌

I can write to H:\ without any issues.

If you could check one more thing... are you able to create H:\.config\ (and then H:\.config\jgit\) directories manually? 🤔 if you are, this should obviously work around the issue for your system once and for all (ofc doesn't explain why JGit wasn't able to create these directories in the first place 🤔)

@Crown0815
Copy link
Author

are you able to create H:\.config\

@PawelLipski that is the issue. I just checked and the folder .config already exists. However, I am running in a remote setting where H:\ is synched to my computer. This synchronization appears to be incomplete (I have to ask the system admin why). As a consequence, .config exists but is inaccessible.

@PawelLipski
Copy link
Collaborator

Okay... closing the issue then as for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants