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

git plugin 2.0 started giving error to connect git over https

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      after upgrading git-plugin from 1.5 to 2.0, i started getting error which connecting to git
      Failed to connect to repository : Failed to connect to https://git...../test.git

      I have checked the cloning part by running it in "execute shell" during build steps and it is working fine.

      Even i ran the build and got following log

      Cloning the remote Git repository
      Cloning repository https://git...../test.git
      git --version
      git version 1.7.11.3
      ERROR: Error cloning remote repo 'origin' : Could not clone https://git....../test.git
      hudson.plugins.git.GitException: Could not clone https://git..../test.git
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:310)
      at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.clone(AbstractGitAPIImpl.java:60)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:64)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1012)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:948)
      at hudson.FilePath.act(FilePath.java:916)
      at hudson.FilePath.act(FilePath.java:889)
      at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:948)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1114)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
      at hudson.model.Run.execute(Run.java:1665)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)
      Caused by: hudson.plugins.git.GitException: Failed to connect to https://github......./test.git
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1441)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1379)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:304)
      ... 16 more
      Trying next repository
      ERROR: Could not clone repository
      java.io.IOException: Could not clone
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1025)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:948)
      at hudson.FilePath.act(FilePath.java:916)
      at hudson.FilePath.act(FilePath.java:889)
      at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:948)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1114)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
      at hudson.model.Run.execute(Run.java:1665)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)

        Attachments

          Activity

          Hide
          vishal_vsh1 vishal sahasrabuddhe added a comment -

          we are not using any authentication to checkout the code from repo.

          Show
          vishal_vsh1 vishal sahasrabuddhe added a comment - we are not using any authentication to checkout the code from repo.
          Hide
          vishal_vsh1 vishal sahasrabuddhe added a comment -

          btw, as per the document i have done both the tasks

          Git path to a fully qualified path for git binary
          and
          updating the gitconfig.

          and still the same error

          ERROR: Error cloning remote repo 'origin'
          hudson.plugins.git.GitException: Could not clone https://git.....com/sandbox/test.git
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:310)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:828)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1367)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:674)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:579)
          at hudson.model.Run.execute(Run.java:1575)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)
          Caused by: hudson.plugins.git.GitException: Failed to connect to https://git.....com/sandbox/test.git
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1441)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1379)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:304)
          ... 10 more
          ERROR: null

          Show
          vishal_vsh1 vishal sahasrabuddhe added a comment - btw, as per the document i have done both the tasks Git path to a fully qualified path for git binary and updating the gitconfig. and still the same error ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not clone https://git.....com/sandbox/test.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:310) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:828) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861) at hudson.model.AbstractProject.checkout(AbstractProject.java:1367) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:674) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:579) at hudson.model.Run.execute(Run.java:1575) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Caused by: hudson.plugins.git.GitException: Failed to connect to https://git.....com/sandbox/test.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1441) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1379) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:304) ... 10 more ERROR: null
          Hide
          vishal_vsh1 vishal sahasrabuddhe added a comment -

          instead of https if i try to use git protocol, it is working

          like
          git://git.....com/sandbox/test.git

          Why its not working only for https, i do not setup any authentication for checkout.

          Show
          vishal_vsh1 vishal sahasrabuddhe added a comment - instead of https if i try to use git protocol, it is working like git://git.....com/sandbox/test.git Why its not working only for https, i do not setup any authentication for checkout.
          Hide
          markewaite Mark Waite added a comment -

          Could you check again with git-plugin 2.0.1 and git-client-plugin 1.6.2? The git-client-plugin credentials implementation is more mature now and has been confirmed to work over https with or without credentials to GitHub and to bitbucket.

          There is a known bug ( JENKINS-20356 ) that the cloning with credentials does not work when Jenkins is running as a Windows service.

          There may also be issues with self-signed certificates on https servers, though I don't have access to a server with a self-signed certificate for testing.

          Show
          markewaite Mark Waite added a comment - Could you check again with git-plugin 2.0.1 and git-client-plugin 1.6.2? The git-client-plugin credentials implementation is more mature now and has been confirmed to work over https with or without credentials to GitHub and to bitbucket. There is a known bug ( JENKINS-20356 ) that the cloning with credentials does not work when Jenkins is running as a Windows service. There may also be issues with self-signed certificates on https servers, though I don't have access to a server with a self-signed certificate for testing.
          Hide
          markewaite Mark Waite added a comment -

          Based on no response from the submitter, and responses from others that these types of errors are significantly reduced in git-client-plugin 1.6.2 (and later) and git-plugin 2.0.1 (and later), I'm closing this as "cannot reproduce".

          Show
          markewaite Mark Waite added a comment - Based on no response from the submitter, and responses from others that these types of errors are significantly reduced in git-client-plugin 1.6.2 (and later) and git-plugin 2.0.1 (and later), I'm closing this as "cannot reproduce".

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              vishal_vsh1 vishal sahasrabuddhe
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: