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

Access violation when run as normal user #490

Open
stayleen opened this issue May 17, 2021 · 3 comments
Open

Access violation when run as normal user #490

stayleen opened this issue May 17, 2021 · 3 comments

Comments

@stayleen
Copy link

What happened?

When the plugin is run without Administrator privileges,
it tries to access C:\Program Files\Git\etc to create a file called

.probe-<some UUID>

This results in an access violation.
The UUID is different for each run, so it does not help to create the directory by hand, which I tried as a workaround.
I am running gradle within IntelliJ. When I run IntelliJ as Administrator, this exception does not occur.

Is there a way to tell the plugin where to create its probe files to get around this?

Git for Windows version: 2.31.1.windows.1
Plugin version: 0.12.3

Configure project :
C:\Program Files\Git\etc.probe-8705efe9-59ab-42a8-acc2-545b02b5b940
java.nio.file.AccessDeniedException: C:\Program Files\Git\etc.probe-8705efe9-59ab-42a8-acc2-545b02b5b940
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:235)
at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
at java.base/java.nio.file.Files.createFile(Files.java:648)
at org.eclipse.jgit.util.FS$FileStoreAttributeCache.(FS.java:234)
at org.eclipse.jgit.util.FS$FileStoreAttributeCache.getFsTimestampResolution(FS.java:211)
at org.eclipse.jgit.util.FS.getFsTimerResolution(FS.java:321)
at org.eclipse.jgit.internal.storage.file.FileSnapshot.(FileSnapshot.java:186)
at org.eclipse.jgit.internal.storage.file.FileSnapshot.save(FileSnapshot.java:122)
at org.eclipse.jgit.storage.file.FileBasedConfig.load(FileBasedConfig.java:155)
at org.eclipse.jgit.internal.storage.file.FileRepository.loadSystemConfig(FileRepository.java:252)
at org.eclipse.jgit.internal.storage.file.FileRepository.(FileRepository.java:205)
at org.eclipse.jgit.internal.storage.file.FileRepository.(FileRepository.java:153)
at com.palantir.gradle.gitversion.GitVersionPlugin.gitRepo(GitVersionPlugin.java:73)
at com.palantir.gradle.gitversion.GitVersionPlugin.apply(GitVersionPlugin.java:36)
at com.palantir.gradle.gitversion.GitVersionPlugin.apply(GitVersionPlugin.java:29)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:42)
at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:50)
at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:177)
at org.gradle.api.internal.plugins.DefaultPluginManager.access$300(DefaultPluginManager.java:51)
at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.java:267)
....

@stayleen stayleen changed the title NPE when run as normal user Access violation when run as normal user May 19, 2021
@ilka-schulz
Copy link

could not reproduce on GNU/Linux (Debian 10 x86_64)

@suppergerrie2
Copy link

This seems to be an issue in JGit: https://bugs.eclipse.org/bugs/show_bug.cgi?id=548648, updating to > 5.4.2 should fix it.
It doesn't seem to stop the plugin from working but does throw an error everytime a gradle task is executed.

@wsdng
Copy link

wsdng commented Mar 23, 2022

I have the same issue. What about the initial question:
"Is there a way to tell the plugin where to create its probe files to get around this?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants