• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • None
    • CentOS: 6.5
      git: 1.7.1
      Jenkins: 1.532.3
      Git Plugin: 2.2.1
      Git Client Plugin: 1.8.0

      No proxy
      https connection with self-signed cert

      When using git via CLI, "git ls-remote -h https://git.abc.com/git/repos/abc.git HEAD" on the jenkins server it works with no issue but when adding the repository in the project configuration, we see the following:

      Failed to connect to repository : Command "ls-remote -h https://git.abc.com/git/repos/abc.git HEAD" returned status code 128:
      stdout:
      stderr: error: while accessing https://git.abc.com/git/repos/abc.git/info/refs
      fatal: HTTP request failed

          [JENKINS-22682] git "HTTP request failed" in Jenkins

          Mark Waite added a comment -

          Were you using credentials through your self-signed https URL?

          The git credentials helper is not available until git version 1.7.10, and you're using git version 1.7.1. It seems like you would also have been aided in your diagnostics by the enhancement proposed in JENKINS-21887.

          I think this is "not a bug" because the git-client-plugin needs at least git version 1.7.10 for credentials support.

          Mark Waite added a comment - Were you using credentials through your self-signed https URL? The git credentials helper is not available until git version 1.7.10, and you're using git version 1.7.1. It seems like you would also have been aided in your diagnostics by the enhancement proposed in JENKINS-21887 . I think this is "not a bug" because the git-client-plugin needs at least git version 1.7.10 for credentials support.

          Mark Waite added a comment - - edited

          You may also need to investigate the skip certificate check plugin to see if certificate checking needs to be disabled for all of Jenkins.

          Mark Waite added a comment - - edited You may also need to investigate the skip certificate check plugin to see if certificate checking needs to be disabled for all of Jenkins.

          Mark Waite added a comment -

          The git-client-plugin bug report JENKINS-22675 may also be related.

          Mark Waite added a comment - The git-client-plugin bug report JENKINS-22675 may also be related.

          Mark Waite added a comment -

          Yet another possibility is to configure JGit in addition to the default command line git, and see if you can resolve the issue through JGit.

          Mark Waite added a comment - Yet another possibility is to configure JGit in addition to the default command line git, and see if you can resolve the issue through JGit.

          Everard Brown added a comment - - edited

          Lots of suggestions... thanks.

          Here's what did not work:
          o The skip certificate check plugin
          o Upgrade my native git package to 1.7.10+ (but that was how I was able to figure out what the real problem was - the error message informs you that you need the CA cert)

          Here's what did work:
          o Copied my cacert.pem to the jenkins server (into $HOME/.git-certs/)
          o Added the following lines to $HOME/.gitconfig:
          [http]
          sslVerify = true
          sslCAPath = /home/jenkins/.git-certs

          I have upgraded my native git package to git-1.7.12.3, and still can't clone (due to java.lang.IllegalArgumentException: Null value not allowed as an environment variable: GIT_COMMIT) but methinks that is a different bug/feature.

          This issue can be closed.

          Everard Brown added a comment - - edited Lots of suggestions... thanks. Here's what did not work: o The skip certificate check plugin o Upgrade my native git package to 1.7.10+ (but that was how I was able to figure out what the real problem was - the error message informs you that you need the CA cert) Here's what did work: o Copied my cacert.pem to the jenkins server (into $HOME/.git-certs/) o Added the following lines to $HOME/.gitconfig: [http] sslVerify = true sslCAPath = /home/jenkins/.git-certs I have upgraded my native git package to git-1.7.12.3, and still can't clone (due to java.lang.IllegalArgumentException: Null value not allowed as an environment variable: GIT_COMMIT) but methinks that is a different bug/feature. This issue can be closed.

            ndeloof Nicolas De Loof
            everard_brown Everard Brown
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: