Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5187

RemoteSshGitRepositoryTestCase does not work with non-localhost hostname

XMLWordPrintable

      RemoteSshGitRepositoryTestCase results in error when the hostname is not localhost.

      java.lang.RuntimeException: WFLYSRV0269: Failed to initialize the repository ssh://testEC@127.0.0.1:42235/doesntmatter
      	at org.jboss.as.server@14.0.0.Beta2-SNAPSHOT//org.jboss.as.server.controller.git.GitRepository.<init>(GitRepository.java:150)
      	at org.jboss.as.server@14.0.0.Beta2-SNAPSHOT//org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:530)
      	at org.jboss.as.server@14.0.0.Beta2-SNAPSHOT//org.jboss.as.server.Main.determineEnvironment(Main.java:388)
      	at org.jboss.as.server@14.0.0.Beta2-SNAPSHOT//org.jboss.as.server.Main.main(Main.java:96)
      	at org.jboss.modules.Module.run(Module.java:352)
      	at org.jboss.modules.Module.run(Module.java:320)
      	at org.jboss.modules.Main.main(Main.java:617)
      Caused by: org.eclipse.jgit.api.errors.TransportException: ssh://testEC@127.0.0.1:42235/doesntmatter: DefaultAuthFuture[ssh-connection]: Failed (UnsupportedCredentialItem) to execute: ssh://testEC@okotek.abc:42235: org.eclipse.jgit.transport.CredentialItem$InformationalMessage:The authenticity of host 'okotek.abc' cannot be established.
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:222)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.api.PullCommand.call(PullCommand.java:263)
      	at org.jboss.as.server@14.0.0.Beta2-SNAPSHOT//org.jboss.as.server.controller.git.GitRepository.<init>(GitRepository.java:144)
      	... 6 more
      Caused by: org.eclipse.jgit.errors.TransportException: ssh://testEC@127.0.0.1:42235/doesntmatter: DefaultAuthFuture[ssh-connection]: Failed (UnsupportedCredentialItem) to execute: ssh://testEC@okotek.abc:42235: org.eclipse.jgit.transport.CredentialItem$InformationalMessage:The authenticity of host 'okotek.abc' cannot be established.
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:233)
      	at org.jboss.as.server@14.0.0.Beta2-SNAPSHOT//org.jboss.as.server.controller.git.ElytronClientSshdSessionFactory.getSession(ElytronClientSshdSessionFactory.java:129)
      	at org.jboss.as.server@14.0.0.Beta2-SNAPSHOT//org.jboss.as.server.controller.git.ElytronClientSshdSessionFactory.getSession(ElytronClientSshdSessionFactory.java:69)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:107)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:254)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:144)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:105)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:91)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.Transport.fetch(Transport.java:1260)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:211)
      	... 8 more
      Caused by: org.apache.sshd.common.SshException: DefaultAuthFuture[ssh-connection]: Failed (UnsupportedCredentialItem) to execute: ssh://testEC@okotek.abc:42235: org.eclipse.jgit.transport.CredentialItem$InformationalMessage:The authenticity of host 'okotek.abc' cannot be established.
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.future.AbstractSshFuture.lambda$verifyResult$1(AbstractSshFuture.java:137)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.future.AbstractSshFuture.formatExceptionMessage(AbstractSshFuture.java:196)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:136)
      	at org.apache.sshd@2.4.0//org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39)
      	at org.apache.sshd@2.4.0//org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.sshd.SshdSession.connect(SshdSession.java:93)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:229)
      	... 17 more
      Caused by: org.eclipse.jgit.errors.UnsupportedCredentialItem: ssh://testEC@okotek.abc:42235: org.eclipse.jgit.transport.CredentialItem$InformationalMessage:The authenticity of host 'okotek.abc' cannot be established.
      	at org.jboss.as.server@14.0.0.Beta2-SNAPSHOT//org.jboss.as.server.controller.git.ElytronClientCredentialsProvider.get(ElytronClientCredentialsProvider.java:95)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.transport.CredentialsProvider.get(CredentialsProvider.java:125)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.internal.transport.sshd.OpenSshServerKeyDatabase$AskUser.askUser(OpenSshServerKeyDatabase.java:422)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.internal.transport.sshd.OpenSshServerKeyDatabase$AskUser.acceptUnknownKey(OpenSshServerKeyDatabase.java:479)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.internal.transport.sshd.OpenSshServerKeyDatabase.accept(OpenSshServerKeyDatabase.java:243)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.internal.transport.sshd.JGitServerKeyVerifier.verifyServerKey(JGitServerKeyVerifier.java:94)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.internal.transport.sshd.JGitClientSession.checkKeys(JGitClientSession.java:342)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.session.helpers.AbstractSession.handleKexMessage(AbstractSession.java:578)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:464)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:392)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1304)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:348)
      	at org.eclipse.jgit@5.9.0.202009080501-r//org.eclipse.jgit.internal.transport.sshd.JGitClientSession.messageReceived(JGitClientSession.java:330)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:63)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:368)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:346)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:343)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.sshd@2.4.0//org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37)
      	at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
      	at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:219)
      	at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      ...
      

      This is a test issue, adding the hostname to test known hosts helps.

              okotek@redhat.com Ondrej Kotek
              okotek@redhat.com Ondrej Kotek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: