Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-12561

if cloning fails because of an missing IdentityFile (in ssh config), error dialog only shows a meaningless TargetInvocationException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.0.0.Alpha2
    • 3.3.0.Final
    • openshift
    • None
    • Hide

      1. ASSERT: make sure that you have a <home>/.ssh/config that points to an non-existing identity file

      Host *.rhcloud.com
          IdentityFile ~/.ssh/bogus_id_dsa
          VerifyHostKeyDNS yes
          StrictHostKeyChecking no
          UserKnownHostsFile ~/.ssh/libra_known_hosts
      

      2. ASSERT: make sure you have an application on OpenShift
      3. EXEC: launch the Import OpenShift Application wizard and try to import this applcation.

      Result:
      Cloning fails with a TargetInvocationException that does not unveil what really went wrong:

      The Eclispe log shows the full stracktrace that unveils what went wrong. The FileNotFoundException which caused this is wrapped: InvocationTargetException->TransportException->JSchException->FileNotFoundException

      java.lang.reflect.InvocationTargetException
      	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:173)
      	at org.jboss.tools.openshift.egit.core.EGitUtils.cloneRepository(EGitUtils.java:245)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.appimport.AbstractImportApplicationOperation.cloneRepository(AbstractImportApplicationOperation.java:94)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportNewProject.execute(ImportNewProject.java:73)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizardModel.importProject(OpenShiftExpressApplicationWizardModel.java:82)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard$ImportJob.runInWorkspace(OpenShiftExpressApplicationWizard.java:304)
      	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      Caused by: org.eclipse.jgit.api.errors.TransportException: ssh://28852364e2544560944df195f0f1074e@as-openshiftci.rhcloud.com/~/git/as.git/: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
      	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137)
      	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178)
      	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125)
      	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:153)
      	... 7 more
      Caused by: org.eclipse.jgit.errors.TransportException: ssh://28852364e2544560944df195f0f1074e@as-openshiftci.rhcloud.com/~/git/as.git/: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
      	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142)
      	at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
      	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
      	at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
      	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127)
      	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
      	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1069)
      	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
      	... 10 more
      Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
      	at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:98)
      	at com.jcraft.jsch.JSch.addIdentity(JSch.java:224)
      	at com.jcraft.jsch.JSch.addIdentity(JSch.java:210)
      	at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:233)
      	at org.eclipse.egit.ui.EclipseSshSessionFactory.createSession(EclipseSshSessionFactory.java:45)
      	at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:150)
      	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:109)
      	... 17 more
      Caused by: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
      	at java.io.FileInputStream.open(Native Method)
      	at java.io.FileInputStream.<init>(FileInputStream.java:120)
      	at java.io.FileInputStream.<init>(FileInputStream.java:79)
      	at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:83)
      	... 23 more
      

      Expected result:
      The error dialog should unveil the FileNotFoundException that caused this.

      Show
      1. ASSERT: make sure that you have a <home>/.ssh/config that points to an non-existing identity file Host *.rhcloud.com IdentityFile ~/.ssh/bogus_id_dsa VerifyHostKeyDNS yes StrictHostKeyChecking no UserKnownHostsFile ~/.ssh/libra_known_hosts 2. ASSERT: make sure you have an application on OpenShift 3. EXEC: launch the Import OpenShift Application wizard and try to import this applcation. Result: Cloning fails with a TargetInvocationException that does not unveil what really went wrong: The Eclispe log shows the full stracktrace that unveils what went wrong. The FileNotFoundException which caused this is wrapped: InvocationTargetException->TransportException->JSchException->FileNotFoundException java.lang.reflect.InvocationTargetException at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:173) at org.jboss.tools.openshift.egit.core.EGitUtils.cloneRepository(EGitUtils.java:245) at org.jboss.tools.openshift.express.internal.ui.wizard.appimport.AbstractImportApplicationOperation.cloneRepository(AbstractImportApplicationOperation.java:94) at org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportNewProject.execute(ImportNewProject.java:73) at org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizardModel.importProject(OpenShiftExpressApplicationWizardModel.java:82) at org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard$ImportJob.runInWorkspace(OpenShiftExpressApplicationWizard.java:304) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: org.eclipse.jgit.api.errors.TransportException: ssh: //28852364e2544560944df195f0f1074e@as-openshiftci.rhcloud.com/~/git/as.git/: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137) at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178) at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125) at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:153) ... 7 more Caused by: org.eclipse.jgit.errors.TransportException: ssh: //28852364e2544560944df195f0f1074e@as-openshiftci.rhcloud.com/~/git/as.git/: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory) at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142) at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1069) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128) ... 10 more Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory) at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:98) at com.jcraft.jsch.JSch.addIdentity(JSch.java:224) at com.jcraft.jsch.JSch.addIdentity(JSch.java:210) at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:233) at org.eclipse.egit.ui.EclipseSshSessionFactory.createSession(EclipseSshSessionFactory.java:45) at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:150) at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:109) ... 17 more Caused by: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:120) at java.io.FileInputStream.<init>(FileInputStream.java:79) at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:83) ... 23 more Expected result: The error dialog should unveil the FileNotFoundException that caused this.
    • Workaround Exists
    • Hide

      fix your <home>/.ssh/config or simply kill it.

      Show
      fix your <home>/.ssh/config or simply kill it.

    Attachments

      Issue Links

        Activity

          People

            adietish@redhat.com André Dietisheim
            adietish@redhat.com André Dietisheim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: