Clone error - non ASCII chars on file name [message #1815534] |
Fri, 04 October 2019 06:32  |
Eclipse User |
|
|
|
JGit is throwing an error when the clone command is called. The logs show that the problem is caused when renaming files which have non ASCII characters in their file names (specifically the copyright sign).
We are running JGit as a Java Process triggered from an Apache WebServer. The java process is launched with the options:
-Dfile.encoding=UTF-8
-Dsun.jnu.encoding=UTF-8
The clone fails with the error "Could not rename file /pathtogitrepolocaldir/git_7456e938-17a2-448e-9a68-e8985f71e36e/._FileNameWith©.tmp to /pathtogitrepolocaldir/git_7456e938-17a2-448e-9a68-e8985f71e36e/FileNameWith©"
Surprisingly, running the java process from the command line with "sudo" gets the repository cloned without issues. Running without sudo on a repo without non-ASCII chars works fine as well, of course, so it does not seem to be a file permissions issue.
We are running JGit version 5.5.0.201909110433-r. We updated from 4.8.0.201706111038-r, which was also showing the same behaviour.
Any help will be appreciated, but please note that we do not control the contents of the repo we are cloning, so changing the name of the files is not a workable fix.
|
|
|
|
|
Re: Clone error - non ASCII chars on file name [message #1815621 is a reply to message #1815595] |
Mon, 07 October 2019 07:30  |
Eclipse User |
|
|
|
@Thomas, Matthias:
Thanks for your help and quick response. Indeed, even though the user's environment and the Apache configuration specified LANG=en_US.UTF-8, by the time the Java process was launched, this had changed to LANG=C.
The fix was to set the variable on the command which launched the Java process. Once this was done, problem fixed!
Thanks again.
|
|
|
Powered by
FUDForum. Page generated in 0.04041 seconds