Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75979

Error when cloning via ssh Bouncy Castle

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins Version 2.492.2
      Java 1.8.0_333 Oracle
      Git client 6.1.2

      We are getting an error when trying to clone a repo via ssh with jgit
      hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: ssh://git@REDACTED: [ssh-connection]: Failed (NoSuchProviderException) to execute: JCE cannot authenticate the provider BC

      We've tried setting up manually on our java installation the BC, tried different JDK, etc, adding to security, testing from different machines. We are running RHEL on both the Controller as the Agent.

      Full Trace:

      hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: ssh://git@REDACTED: [ssh-connection]: Failed (NoSuchProviderException) to execute: JCE cannot authenticate the provider BC
          at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.JGitAPIImpl$4.execute(JGitAPIImpl.java:1729)
          at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:173)
          at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:164)
          at hudson.remoting.UserRequest.perform(UserRequest.java:225)
          at hudson.remoting.UserRequest.perform(UserRequest.java:50)
          at hudson.remoting.Request$2.run(Request.java:391)
          at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:81)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          at java.base/java.lang.Thread.run(Thread.java:842)
          Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to Docker-RedHat
              at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1923)
              at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:384)
              at hudson.remoting.Channel.call(Channel.java:1112)
              at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:155)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.base/java.lang.reflect.Method.invoke(Unknown Source)
              at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:140)
              at PluginClassLoader for git-client/jdk.proxy26/jdk.proxy26.$Proxy288.execute(Unknown Source)
              at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1221)
              at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1311)
              at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1278)
              at hudson.scm.SCM.checkout(SCM.java:540)
              at hudson.model.AbstractProject.checkout(AbstractProject.java:1250)
              at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:649)
              at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:522)
              at hudson.model.Run.execute(Run.java:1833)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
              at hudson.model.ResourceController.execute(ResourceController.java:101)
              at hudson.model.Executor.run(Executor.java:446)
      Caused by: org.eclipse.jgit.api.errors.TransportException: ssh://git@REDACTED: [ssh-connection]: Failed (NoSuchProviderException) to execute: JCE cannot authenticate the provider BC
          at PluginClassLoader for git-client//org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:249)
          at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.JGitAPIImpl$4.execute(JGitAPIImpl.java:1717)
          ... 10 more
      Caused by: org.eclipse.jgit.errors.TransportException: ssh://git@REDACTED:
      [ssh-connection]: Failed (NoSuchProviderException) to execute: JCE cannot authenticate the provider BC
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:267)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:1)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:107)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:285)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:152)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:153)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:105)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.Transport.fetch(Transport.java:1458)
          at PluginClassLoader for git-client//org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:238)
          ... 11 more
      Caused by: org.apache.sshd.common.SshException: [ssh-connection]: Failed (NoSuchProviderException) to execute: JCE cannot authenticate the provider BC
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.future.AbstractSshFuture.lambda$verifyResult$2(AbstractSshFuture.java:146)
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.future.AbstractSshFuture.formatExceptionMessage(AbstractSshFuture.java:206)
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:145)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:56)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:35)
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:110)
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:96)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.sshd.SshdSession.connect(SshdSession.java:171)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.sshd.SshdSession.connect(SshdSession.java:100)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:260)
          ... 19 more
      Caused by: java.lang.NullPointerException
          at java.base/javax.crypto.ProviderVerifier.verify(ProviderVerifier.java:123)
          at java.base/javax.crypto.JceSecurity.verifyProvider(JceSecurity.java:190)
          at java.base/javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:218)
          at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:128)
          at java.base/javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:240)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:568)
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.util.security.SecurityEntityFactory$2.getInstance(SecurityEntityFactory.java:130)
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.util.security.SecurityUtils.getKeyAgreement(SecurityUtils.java:817)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.common.kex.MontgomeryCurve.<init>(MontgomeryCurve.java:116)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.common.kex.MontgomeryCurve.<clinit>(MontgomeryCurve.java:92)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.common.kex.BuiltinDHFactories$16.isSupported(BuiltinDHFactories.java:341)
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.NamedFactory.lambda$setUpTransformedFactories$0(NamedFactory.java:64)
          at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178)
          at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
          at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
          at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
          at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
          at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
          at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
          at PluginClassLoader for mina-sshd-api-common//org.apache.sshd.common.NamedFactory.setUpTransformedFactories(NamedFactory.java:66)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.client.ClientBuilder.setUpDefaultKeyExchanges(ClientBuilder.java:194)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.client.ClientBuilder.fillWithDefaultValues(ClientBuilder.java:125)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.client.ClientBuilder.fillWithDefaultValues(ClientBuilder.java:56)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.common.BaseBuilder.build(BaseBuilder.java:274)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.client.ClientBuilder.build(ClientBuilder.java:165)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.client.ClientBuilder.build(ClientBuilder.java:56)
          at PluginClassLoader for mina-sshd-api-core//org.apache.sshd.common.BaseBuilder.build(BaseBuilder.java:298)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.sshd.SshdSessionFactory.lambda$0(SshdSessionFactory.java:225)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.sshd.SshdSession.<init>(SshdSession.java:92)
          at PluginClassLoader for git-client//org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:196)
          ... 19 more
      ERROR: Error cloning remote repo 'origin'

            Unassigned Unassigned
            sananias Sergio
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: