Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » getXDGConfigHome fails with user.home resolved to ?(JGit XDG issue by user.home when running in openShift)
getXDGConfigHome fails with user.home resolved to ? [message #1823809] Thu, 02 April 2020 11:29 Go to next message
Torsten Reinhard is currently offline Torsten ReinhardFriend
Messages: 1
Registered: April 2020
Junior Member

my Jenkins Slaves are running in openShift (3.9), the setup is using the jenkins/jnlp-slave:alpine image and Git-client-plugin (3.2.1)

Since one of the last updates of JGit dependency in the Git-client-plugin (>3.0.0-rc) I´m seeing this exception in the logs, which I guess is related to openShift´s "ramdom" user being used for resolving "user.home", but resulting in "?".

What´s the workaround or solution to this? Do I have to set XDG_CONFIG_HOME somewhere to workaround the $(user.home) access ?

Mar 09, 2020 5:36:03 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
Mar 09, 2020 5:38:30 PM org.eclipse.jgit.util.SystemReader$Default getXDGConfigHome
SEVERE: Creating XDG_CONFIG_HOME directory /home/jenkins/?/.config failed
java.nio.file.AccessDeniedException: /home/jenkins/?
	at sun.nio.fs.UnixException.translateToIOException(
	at sun.nio.fs.UnixException.rethrowAsIOException(
	at sun.nio.fs.UnixException.rethrowAsIOException(
	at sun.nio.fs.UnixFileSystemProvider.createDirectory(
	at java.nio.file.Files.createDirectory(
	at java.nio.file.Files.createAndCheckIsDirectory(
	at java.nio.file.Files.createDirectories(
	at org.eclipse.jgit.util.SystemReader$Default.getXDGConfigHome(
	at org.eclipse.jgit.util.SystemReader$Default.openJGitConfig(
	at org.eclipse.jgit.util.SystemReader.getJGitConfig(
	at org.eclipse.jgit.util.SystemReader.getSystemConfig(
	at org.eclipse.jgit.util.SystemReader.getUserConfig(
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRepository(
	at hudson.plugins.git.GitAPI.getRepository(
	at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(
	at hudson.remoting.RemoteInvocationHandler$
	at hudson.remoting.RemoteInvocationHandler$
	at hudson.remoting.UserRequest.perform(
	at hudson.remoting.UserRequest.perform(
	at hudson.remoting.Request$
	at hudson.remoting.InterceptingExecutorService$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
	at hudson.remoting.Engine$1.lambda$newThread$0(

Mar 09, 2020 5:38:33 PM org.eclipse.jgit.util.FS$FileStoreAttributes saveToConfig
SEVERE: Cannot save config file 'FileBasedConfig[/home/jenkins/?/.jgitconfig]' Creating directories for /home/jenkins/? failed
	at org.eclipse.jgit.util.FileUtils.mkdirs(
	at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(
	at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$0(
	at java.util.concurrent.CompletableFuture$

Thanx and best regards,

Re: getXDGConfigHome fails with user.home resolved to ? [message #1823915 is a reply to message #1823809] Fri, 03 April 2020 19:01 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 497
Registered: August 2016
Senior Member
Why random user? Any anyway, even if it's a random user: apparently that image gives that user a home directory (/home/jenkins/?), but that directory doesn't exist. IMO that image needs to be fixed to give that user an existing home directory, and possibly also a better name than "?".

As a work-around you could indeed try setting XDG_CONFIG_HOME to some existing directory where this user has write permission.
Previous Topic:Git clone produces a non-wildcard fetch refspec since 2019-12
Next Topic:Dirty resource - icon by default
Goto Forum:

Current Time: Thu Oct 06 15:21:40 GMT 2022

Powered by FUDForum. Page generated in 0.03006 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top