iazarny / gitember

Gitember another git GUI client written on javafx
http://gitember.org/
84 stars 15 forks source link

Clone error (Windows 10) #8

Closed zhaolinlau closed 3 years ago

zhaolinlau commented 3 years ago

Codes below are the error message. Cannot clone org.eclipse.jgit.errors.ConfigInvalidException: Cannot read file C:\Users\Win10.gitconfig at org.eclipse.jgit.storage.file.FileBasedConfig.load(FileBasedConfig.java:186) at org.eclipse.jgit.util.SystemReader.updateAll(SystemReader.java:390) at org.eclipse.jgit.util.SystemReader.getUserConfig(SystemReader.java:316) at com.az.gitember.service.GitRepoService.configureTransportCommand(GitRepoService.java:1229) at com.az.gitember.service.GitRepoService.cloneRepository(GitRepoService.java:1011) at com.az.gitember.controller.handlers.CloneEventHandler$1.call(CloneEventHandler.java:31) at com.az.gitember.controller.handlers.CloneEventHandler$1.call(CloneEventHandler.java:28) at javafx.concurrent.Task$TaskCallable.call(Task.java:1425) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: org.eclipse.jgit.errors.ConfigInvalidException: Newline in quotes not allowed at org.eclipse.jgit.lib.Config.readValue(Config.java:1388) at org.eclipse.jgit.lib.Config.fromTextRecurse(Config.java:1164) at org.eclipse.jgit.lib.Config.fromText(Config.java:1098) at org.eclipse.jgit.storage.file.FileBasedConfig.load(FileBasedConfig.java:144) ... 9 more

iazarny commented 3 years ago

Can you send the C:\Users\Win10.gitconfig file ?

zhaolinlau commented 3 years ago

Can you send the C:\Users\Win10.gitconfig file ?

[filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true [user] name = Zhaolin Lau email = zhaolinlau@gmail.com [core] editor = atom [gui] editor = C:\Users\Win10\AppData\Local\atom\atom.exe [http] sslVerify = false

zhaolinlau commented 3 years ago

Codes below are the error message. Cannot clone org.eclipse.jgit.errors.ConfigInvalidException: Cannot read file C:\Users\Win10.gitconfig at org.eclipse.jgit.storage.file.FileBasedConfig.load(FileBasedConfig.java:186) at org.eclipse.jgit.util.SystemReader.updateAll(SystemReader.java:390) at org.eclipse.jgit.util.SystemReader.getUserConfig(SystemReader.java:316) at com.az.gitember.service.GitRepoService.configureTransportCommand(GitRepoService.java:1229) at com.az.gitember.service.GitRepoService.cloneRepository(GitRepoService.java:1011) at com.az.gitember.controller.handlers.CloneEventHandler$1.call(CloneEventHandler.java:31) at com.az.gitember.controller.handlers.CloneEventHandler$1.call(CloneEventHandler.java:28) at javafx.concurrent.Task$TaskCallable.call(Task.java:1425) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: org.eclipse.jgit.errors.ConfigInvalidException: Newline in quotes not allowed at org.eclipse.jgit.lib.Config.readValue(Config.java:1388) at org.eclipse.jgit.lib.Config.fromTextRecurse(Config.java:1164) at org.eclipse.jgit.lib.Config.fromText(Config.java:1098) at org.eclipse.jgit.storage.file.FileBasedConfig.load(FileBasedConfig.java:144) ... 9 more

Works with http method, but can't clone with ssh

iazarny commented 3 years ago

Cannot reproduce. However :

  1. related to undelaying jgit lib, whcuih is used in eclipse ide, egit, etc.
  2. according to the exceptions it thrown, during reading "lfs" value. "lfs" only one quoted value. if ('\n' == c) { if (quote) { throw new ConfigInvalidException( // This is Config.java:1388 JGitText.get().newlineInQuotesNotAllowed); } in.reset(); break; }
  3. may be "lfs" some non-printable char among "lfs" chars, which is not copied to the "Win10.gitconfig
  4. "Works with http method, but can't clone with ssh" looks really strange, because code is related to config parsing , which is 100% protocol agnostic.
  5. some little chance, that this issue was fixed in v2.2 with added LFS supporr.