It looks to me as if the git integration is broken again. Setting up a new project with Git doesn't work at all.
The project is not importedl. Git information (username, e-mail) is empty.
OS and version:
Diagnostics:
The terminal of the "dev-machine" shows:
~
2018-08-27 12:30:28,729[equestProcessor] [ERROR] [o.e.c.g.i.jgit.JGitConnection 2219] - Can't store ssh key. Unable get private ssh key
at org.eclipse.che.git.impl.jgit.JGitConnection.executeRemoteCommand(JGitConnection.java:2123)
at org.eclipse.che.git.impl.jgit.JGitConnection.clone(JGitConnection.java:621)
at org.eclipse.che.api.git.GitProjectImporter.cloneRepository(GitProjectImporter.java:264)
at org.eclipse.che.api.project.server.impl.ExecutiveProjectManager.doImport(ExecutiveProjectManager.java:390)
at org.eclipse.che.api.git.GitProjectImporter.doImport(GitProjectImporter.java:195)
at org.eclipse.che.api.project.server.impl.ProjectJsonRpcServiceBackEnd.doImportInternally(ProjectJsonRpcServiceBackEnd.java:240)
at org.eclipse.che.git.impl.jgit.JGitConnection.writePrivateKeyFile(JGitConnection.java:2215)
at org.eclipse.che.plugin.ssh.key.script.SshKeyProviderImpl.getPrivateKey(SshKeyProviderImpl.java:62)
at org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerManager.handle(RequestHandlerManager.java:213)
at java.lang.Thread.run(Thread.java:748)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at org.eclipse.che.api.core.jsonrpc.commons.JsonRpcMessageReceiver.lambda$receive$0(JsonRpcMessageReceiver.java:73)
at org.eclipse.che.api.core.jsonrpc.commons.JsonRpcMessageReceiver.processRequest(JsonRpcMessageReceiver.java:98)
at org.eclipse.che.api.core.jsonrpc.commons.RequestDispatcher.dispatch(RequestDispatcher.java:52)
at org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerManager$OneToOneHandler.access$1000(RequestHandlerManager.java:316)
at org.eclipse.che.api.project.server.impl.ProjectJsonRpcServiceBackEnd.perform(ProjectJsonRpcServiceBackEnd.java:313)
at org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerManager$OneToOneHandler.handle(RequestHandlerManager.java:329)
at org.eclipse.che.api.project.server.impl.ValidatingProjectManager.doImport(ValidatingProjectManager.java:289)
at org.eclipse.che.api.project.server.impl.SynchronizingProjectManager.doImport(SynchronizingProjectManager.java:230)
at org.eclipse.che.api.project.server.impl.ProjectJsonRpcServiceBackEnd.doImport(ProjectJsonRpcServiceBackEnd.java:98)
org.eclipse.che.api.core.ServerException: Unable get private ssh key
at org.eclipse.che.api.project.server.impl.ProjectImportManager.doImport(ProjectImportManager.java:279)
at org.eclipse.che.api.project.server.impl.ProjectImportManager.doImportInternally(ProjectImportManager.java:303)
~
@ctron git installer syncs keys and git committer info between user preferences (when you generate keys in UI) and terminal git.
So maybe that workflow needs a bit more cleanup. I had keys, but not in the user preferences, but in the workspace preferences. Why aren't those taken instead?
And maybe you should print out a proper warning on how to fix this, instead of showing an exception. In addition I found it rather weird that I had to input the name of the target host in the preferences when creating a key. So maybe a little bit of help/info text in that dialog box would help as well.
@ctron if you want to clone a repo using UI Git you need to generate keys using UI
Ok, so what are the keys for that are pre-generated in the workspace?
In any case, I still think that the workflow is kind of weird. I would expect:
Right now the workflow is like this:
And the biggest issue with that is IHMO that Che asks you to enter a hostname for the SSH key, but expects this to be the target hostname. When you create an SSH key locally, then you create this for your "local" machine. So I really do think that you should put in a proper note, explaining that the hostname is not your local host/container, but really the hostname of the remote system: e.g. "github.com".
@ctron yes, configuring SSH keys right in user Dashboard would be a better flow than creating and starting a workspace and then generating keys.
As to providing a hostname for ssh keys, I think it's historical. It must be possible to have one key for all git hosting providers
Closing. Feel free to reopen this issue if you think it's still relevant for you.
This is why I dont use che :(
Most helpful comment
This is why I dont use che :(