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

Slave unable to clone from Git over HTTPS due to self signed certificate

      My slave is unable to clone from Git over HTTPS (via Git plugin version 2.2.1, Git client plugin version 1.9.0), due to the server's self signed certificate. The reason is that Java doesn't find the server's certificate in its store, even though the Git command line client has no problems with it. The error looks as follows:

      FATAL: Failed to fetch from https://myserver/repo.git
      hudson.plugins.git.GitException: Failed to fetch from https://myserver/repo.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:623)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:855)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1251)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
      at hudson.model.Run.execute(Run.java:1706)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)
      Caused by: hudson.plugins.git.GitException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.checkCredentials(CliGitAPIImpl.java:1964)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1143)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:257)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:328)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Unknown Source)

      See also StackOverflow: http://stackoverflow.com/questions/23678127/how-do-i-connect-to-a-jenkins-slave-to-a-git-server-with-self-signed-certificate.

          [JENKINS-23050] Slave unable to clone from Git over HTTPS due to self signed certificate

          Arve Knudsen created issue -
          Arve Knudsen made changes -
          Description Original: My slave is unable to clone from Git over HTTPS (via Git plugin version 2.2.1, Git client plugin version 1.9.0), due to the server's self signed certificate. The reason is that Java doesn't find the server's certificate in its store, even though the Git command line client has no problems with it. The error looks as follows:

          FATAL: Failed to fetch from https://myserver/repo.git
          hudson.plugins.git.GitException: Failed to fetch from https://myserver/repo.git
              at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:623)
              at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:855)
              at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880)
              at hudson.model.AbstractProject.checkout(AbstractProject.java:1251)
              at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
              at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
              at hudson.model.Run.execute(Run.java:1706)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:231)
          Caused by: hudson.plugins.git.GitException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.checkCredentials(CliGitAPIImpl.java:1964)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1143)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:257)
              at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
              at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
              at hudson.remoting.UserRequest.perform(UserRequest.java:118)
              at hudson.remoting.UserRequest.perform(UserRequest.java:48)
              at hudson.remoting.Request$2.run(Request.java:328)
              at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
              at java.util.concurrent.FutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at hudson.remoting.Engine$1$1.run(Engine.java:63)
              at java.lang.Thread.run(Unknown Source)
          New: My slave is unable to clone from Git over HTTPS (via Git plugin version 2.2.1, Git client plugin version 1.9.0), due to the server's self signed certificate. The reason is that Java doesn't find the server's certificate in its store, even though the Git command line client has no problems with it. The error looks as follows:

          FATAL: Failed to fetch from https://myserver/repo.git
          hudson.plugins.git.GitException: Failed to fetch from https://myserver/repo.git
              at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:623)
              at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:855)
              at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880)
              at hudson.model.AbstractProject.checkout(AbstractProject.java:1251)
              at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
              at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
              at hudson.model.Run.execute(Run.java:1706)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:231)
          Caused by: hudson.plugins.git.GitException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.checkCredentials(CliGitAPIImpl.java:1964)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1143)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:257)
              at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
              at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
              at hudson.remoting.UserRequest.perform(UserRequest.java:118)
              at hudson.remoting.UserRequest.perform(UserRequest.java:48)
              at hudson.remoting.Request$2.run(Request.java:328)
              at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
              at java.util.concurrent.FutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at hudson.remoting.Engine$1$1.run(Engine.java:63)
              at java.lang.Thread.run(Unknown Source)

          See also StackOverflow: http://stackoverflow.com/questions/23678127/how-do-i-connect-to-a-jenkins-slave-to-a-git-server-with-self-signed-certificate.
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-22675 [ JENKINS-22675 ]
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-19726 [ JENKINS-19726 ]
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 155372 ] New: JNJira + In-Review [ 207714 ]

            ndeloof Nicolas De Loof
            aknuds1 Arve Knudsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: