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

Jenkins GIT Plugin unable to access repository using HTTPS with self-signed certificate

      When trying to configure a new job and setting GIT repository Jenkins always fails regardless of the configuration when using HTTPS with credentials.

      Here is the error message

      Failed to connect to repository : handshake alert: unrecognized_name

      Local git install has configured

      git config --global http.sslVerify false

          [JENKINS-22675] Jenkins GIT Plugin unable to access repository using HTTPS with self-signed certificate

          jose porcel created issue -
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-22682 [ JENKINS-22682 ]

          Mark Waite added a comment -

          You may also need to investigate the skip certificate check plugin to see if certificate checking needs to be disabled for all of Jenkins. I believe there are portions of the git-plugin and/or git-client-plugin which use Java's certificate validation facilities directly.

          Mark Waite added a comment - You may also need to investigate the skip certificate check plugin to see if certificate checking needs to be disabled for all of Jenkins. I believe there are portions of the git-plugin and/or git-client-plugin which use Java's certificate validation facilities directly.

          jose porcel added a comment -

          Installed the plugin, same issue.

          It works with a public GitHub repository, but not with my GitLab instance, and the issue is not related to credentials (tried keys and username and password).

          The Jenkins version I use is Jenkins ver. 1.559 and it is under Windows (shamefully), I am running it for testing purposes with default basic configuration.

          jose porcel added a comment - Installed the plugin, same issue. It works with a public GitHub repository, but not with my GitLab instance, and the issue is not related to credentials (tried keys and username and password). The Jenkins version I use is Jenkins ver. 1.559 and it is under Windows (shamefully), I am running it for testing purposes with default basic configuration.

          Mark Waite added a comment -

          There is a posting on stackoverflow which provides more detail and may offer some hints of changes you could make to your configuration to avoid the problem.

          Mark Waite added a comment - There is a posting on stackoverflow which provides more detail and may offer some hints of changes you could make to your configuration to avoid the problem.
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-23050 [ JENKINS-23050 ]

          Udo Waechter added a comment -

          In the current version (as of today: 1.2.1, not in jenkins-ci updatecenter yet) there is an option to ignore ssl-certs.

          Udo Waechter added a comment - In the current version (as of today: 1.2.1, not in jenkins-ci updatecenter yet) there is an option to ignore ssl-certs.

          Mark Waite added a comment -

          I don't see a change in the git-plugin source code which provides any option to ignore SSL certificates. Are you sure it is there?

          Mark Waite added a comment - I don't see a change in the git-plugin source code which provides any option to ignore SSL certificates. Are you sure it is there?

          Bernie Durfee added a comment -

          Any update on this? I'm getting the error...

          Failed to connect to repository : sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

          ...even with http.sslverify set to false.

          Is there a good workaround or fix for this issue available yet?

          Bernie Durfee added a comment - Any update on this? I'm getting the error... Failed to connect to repository : sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ...even with http.sslverify set to false. Is there a good workaround or fix for this issue available yet?

          Mark Waite added a comment -

          You might consider the comment in JENKINS-23050 which recommended a work around from Erik Zaadi's blog

          Mark Waite added a comment - You might consider the comment in JENKINS-23050 which recommended a work around from Erik Zaadi's blog

            ndeloof Nicolas De Loof
            josemp jose porcel
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: