Im getting the following error while trying to do a checkout
to my instance of GitLab via SSH using Jgit. Git Client works just fine with the same credential, but can get to work using 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
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'
Jenkins setup:
Jenkins: 2.492.2
OS: Linux - 5.14.0-427.20.1.el9_4.x86_64
Java: 17.0.14 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
Office-365-Connector:5.1.0
allure-jenkins-plugin:2.32.0
amazon-ecr:1.151.vb_ca_71ddd0b_cf
ansible:524.v9fa_a_4c989224
ant:513.vde9e7b_a_0da_0f
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
apache-httpcomponents-client-5-api:5.4-138.veb_85eeefe21a_
asm-api:9.8-135.vb_2239d08ee90
authentication-tokens:1.131.v7199556c3004
authorize-project:2.0.0
aws-credentials:245.v8a_1b_7c11a_94d
aws-java-sdk-ec2:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ecr:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-minimal:1.12.780-480.v4a_0819121a_9e
aws-java-sdk2-core:2.30.28-26.v649b_8df2f988
aws-java-sdk2-ec2:2.30.28-26.v649b_8df2f988
aws-java-sdk2-ecr:2.30.28-26.v649b_8df2f988
azure-credentials:357.v6447d38fb_007
azure-sdk:206.v7df6fdd1d0ff
bootstrap5-api:5.3.3-2
bouncycastle-api:2.30.1.80-256.vf98926042a_9b_
branch-api:2.1214.v3f652804588d
build-monitor-plugin:1.14-973.ve458d62e7c4f
build-timeout:1.37
built-on-column:1.5
caffeine-api:3.2.0-166.v72a_6d74b_870f
checks-api:367.v18b_7f530e54a_
chromedriver:1.2
cloudbees-disk-usage-simple:239.v6a_f1a_c1c8046
cloudbees-folder:6.999.v42253c105443
command-launcher:118.v72741845c17a_
commons-compress-api:1.27.1-3
commons-httpclient3-api:3.1-3
commons-lang3-api:3.17.0-87.v5cf526e63b_8b_
commons-text-api:1.13.0-153.v91dcd89e2a_22
conditional-buildstep:1.5.0
config-file-provider:982.vb_a_e458a_37021
credentials:1413.va_51c53703df1
credentials-binding:687.v619cb_15e923f
cucumber-reports:5.8.5
cucumber-testresult-plugin:0.10.1
cucumber-trends-report:1.3
cvs:476.v1a_f0c9e7e218
data-tables-api:2.2.2-1
dependency-check-jenkins-plugin:5.6.0
deploy:1.16
discard-old-build:1.08
disk-usage:1.3
display-url-api:2.209.v582ed814ff2f
docker-commons:451.vd12c371eeeb_3
docker-workflow:611.v16e84da_6d3ff
durable-task:587.v84b_877235b_45
echarts-api:5.6.0-2
eddsa-api:0.3.0.1-19.vc432d923e5ee
email-ext:1876.v28d8d38315b_d
envinject:2.926.v69c9b_3896a_96
envinject-api:1.235.va_14c74f8f487
external-monitor-job:223.vb_fddcf42c9b_3
fitnesse:1.36
flatpickr-api:4.6.13-18.vcf5f6a_5b_8468
font-awesome-api:6.7.2-1
generic-webhook-trigger:2.3.1
git:5.7.0
git-client:6.1.2
git-parameter:435.va_f85861c663a_
git-server:137.ve0060b_432302
github:1.43.0
github-api:1.321-488.v9b_c0da_9533f8
github-branch-source:1815.v9152b_2ff7a_1b_
gitlab-api:5.6.0-100.v83f8f4b_f1129
gitlab-branch-source:718.v40b_5f0e67cd3
gitlab-plugin:1.9.7
global-build-stats:322.v22f4db_18e2dd
googleanalytics:1.3
gradle:2.14.1
gson-api:2.12.1-113.v347686d6729f
handy-uri-templates-2-api:2.1.8-36.v85e4cb_234a_13
htmlpublisher:425
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:82.v0597178874e1
jackson2-api:2.18.3-402.v74c4eb_f122b_2
jakarta-activation-api:2.1.3-2
jakarta-mail-api:2.1.3-2
javadoc:310.v032f3f16b_0f8
javax-activation-api:1.2.0-8
javax-mail-api:1.6.2-11
jaxb:2.3.9-133.vb_ec76a_73f706
jcaptcha-plugin:20.vb_7ecb_3544a_7c
jdk-tool:83.v417146707a_3d
jersey2-api:2.45-154.v4ded3dc34f81
jira:3.14
jjwt-api:0.11.5-120.v0268cf544b_89
jnr-posix-api:3.1.20-138.vdb_9db_a_39182f
jobConfigHistory:1305.vf20a_356586b_8
joda-time-api:2.14.0-127.v7d9da_295a_d51
jquery:1.12.4-3
jquery3-api:3.7.1-3
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20250107-125.v28b_a_ffa_eb_f01
json-path-api:2.9.0-148.v22a_7ffe323ce
junit:1319.v000471ca_e5e2
kubernetes-cli:1.364.vadef8cb8b823
kubernetes-client-api:6.10.0-251.v556f5f100500
kubernetes-credentials:192.v4d5b_1c429d17
ldap:780.vcb_33c9a_e4332
lockable-resources:1349.v8b_ccb_c5487f7
mailer:489.vd4b_25144138f
mapdb-api:1.0.9-44.va_1e1310c9118
mask-passwords:188.v66e477dcb_24a_
matrix-auth:3.2.6
matrix-project:847.v88a_f90ff9f20
maven-plugin:3.25
metrics:4.2.21-464.vc9fa_a_0d6265d
mina-sshd-api-common:2.14.0-143.v2b_362fc39576
mina-sshd-api-core:2.14.0-143.v2b_362fc39576
miniorange-saml-sp:2.4.5
monitoring:2.5.0
msbuild:1.36
mstest:1.0.5
mstestrunner:1.5.0
multibranch-scan-webhook-trigger:1.0.11
nodejs:1.6.4
notify-events:1.6.2
oic-auth:4.494.v6b_f419104767
okhttp-api:4.11.0-189.v976fa_d3379d6
openid:2.5.0
openid4java:0.9.8.0
oss-symbols-api:308.v0c48656b_15c1
pam-auth:1.12
parameterized-trigger:840.v3c7d4a_a_5e6c7
performance:980.vf4df84f69474
pipeline-build-step:557.v95d96f77b_2b_8
pipeline-github-lib:65.v203688e7727e
pipeline-graph-analysis:235.vb_a_a_36b_f248c2
pipeline-graph-view:423.v765c49ca_da_3f
pipeline-groovy-lib:752.vdddedf804e72
pipeline-input-step:517.vf8e782ee645c
pipeline-milestone-step:127.vb_52887ca_3b_6d
pipeline-model-api:2.2247.va_423189a_7dff
pipeline-model-definition:2.2247.va_423189a_7dff
pipeline-model-extensions:2.2247.va_423189a_7dff
pipeline-rest-api:2.37
pipeline-stage-step:322.vecffa_99f371c
pipeline-stage-tags-metadata:2.2247.va_423189a_7dff
pipeline-stage-view:2.37
pipeline-utility-steps:2.19.0
plain-credentials:195.vb_906e9073dee
plugin-util-api:6.1.0
powershell:2.3
prometheus:819.v50953a_c560dd
promoted-builds:984.v90b_eb_99fc7b_4
publish-over:0.22
publish-over-ftp:248.v1487ff759c7a_
publish-over-ssh:387.vec3df0f668cd
qmetry-for-jira-test-management:1.25
remote-file:1.24
resource-disposer:0.25
robot:5.0.0
run-condition:243.v3c3f94e46a_8b_
saml:4.525.v4f6a_7209447e
scm-api:704.v3ce5c542825a_
script-security:1373.vb_b_4a_a_c26fa_00
seleniumhtmlreport:1.1
snakeyaml-api:2.3-125.v4d77857a_b_402
sonar:2.18
sonar-quality-gates:352.vdcdb_d7994fb_6
ssh-agent:384.ve275343791a_6
ssh-credentials:355.v9b_e5b_cde5003
ssh-slaves:3.1031.v72c6b_883b_869
sshd:3.353.v2b_d33c46e970
structs:343.vdcf37b_a_c81d5
subversion:1287.vd2d507146906
terraform:1.0.10
text-finder:1.31
tibco-builder:1.4
timestamper:1.28
token-macro:444.v52de7e9c573d
trilead-api:2.192.vc50a_d147e369
uno-choice:2.8.6
variant:70.va_d9f17f859e0
versioncolumn:320.v6b_b_814ca_01f7
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1366.vf1fb_e1a_f6b_22
workflow-basic-steps:1079.vce64b_a_929c5a_
workflow-cps:4050.v8b_a_69b_587c39
workflow-durable-task-step:1405.v1fcd4a_d00096
workflow-job:1508.v9cb_c3a_a_89dfd
workflow-multibranch:803.v08103b_87c280
workflow-scm-step:437.v05a_f66b_e5ef8
workflow-step-api:700.v6e45cb_a_5a_a_21
workflow-support:963.va_600813d04a_a_
ws-cleanup:0.48
xvfb:1.2
xvnc:1.28