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

java.io.IOException: Creating directories for U:\.config\jgit failed #805

Closed
MichaelInsberg opened this issue Apr 7, 2022 · 4 comments
Closed
Assignees
Labels
bug Something isn't working git-core windows
Milestone

Comments

@MichaelInsberg
Copy link

Bug description

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

For more non-trivial issues, we would also appreciate if you included the following details (if not filled automatically):

Running environment

  • Git Machete plugin version - 1.2.1
  • IDE - JetBrains Rider 2021.3.3
  • Operating system - Windows 10 10.0

IDEA - Stack trace

java.io.IOException: Creating directories for U:\.config\jgit failed
	at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:412)
	at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:140)
	at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:219)
	at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:744)
	at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$4(FS.java:430)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

IDEA - additional info

N/A

Screenshots

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

@PawelLipski PawelLipski added bug Something isn't working git-core labels Apr 7, 2022
@PawelLipski PawelLipski added this to the Externally requested features/fixes milestone Apr 7, 2022
@PawelLipski
Copy link
Collaborator

Hey @MichaelInsberg... thanks for reporting 🐞 given that the stack trace is pretty limited (due to the use of ThreadPoolExecutor i.e. async execution by JGit library)... do you remember the circumstances when this exception happened? Also, can you show the listing of U:\.config\ directory (does it even exist)? My first suspicion would be that your current system user is forbidden from creating new directories directly under U:\ disk 🤔

@PawelLipski
Copy link
Collaborator

PawelLipski commented Apr 7, 2022

For the record: JGit creates a .config/jgit/config file, more details under https://stackoverflow.com/questions/58074297/what-is-the-meaning-of-this-gitconfig-filesystem-section-filesystem-private

As a quick fix, if my above diagnose is correct ☝🏻, you can change the XDG_CONFIG_HOME env var in the system settings from the default U:\.config to some other directory (where your system user will have the permissions to write).

@mkondratek
Copy link
Collaborator

It's hard to say what's wrong without more details.

Extending @PawelLipski advice I can suggest running IntelliJ as administrator.

I ve been using Git Machete IntelliJ Plugin a bit on Windows but I see this one for the first time.
I also tried to reproduce it now but no success on that.


@MichaelInsberg if you tell us more about the circumstances we probably will be able to do something.

@mkondratek
Copy link
Collaborator

No response for a while now. Closing.

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

No branches or pull requests

3 participants