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

git-client does not support authentication proxy

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-client-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.574
      Git client plugin 1.10.1
      Git plugin 2.2.4
      Ubuntu 13.10 x64
      OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.13.10.1)
    • Similar Issues:

      Description

      When Jenkins is behind an authentication proxy, git-client cannot checkout git repository.

      Cloning the remote Git repository
      Cloning repository https://example.com/example.git
       > git init /var/lib/jenkins/jobs/test/workspace # timeout=10
      Fetching upstream changes from https://example.com/example.git
       > git --version # timeout=10
      using .gitcredentials to set credentials
       > git config --local credential.helper store --file=/tmp/git3935065820026506239.credentials # timeout=10
      Setting http proxy: http://example.local:8080/
       > git fetch --tags --progress https://example.com/example.git +refs/heads/*:refs/remotes/origin/*
       > git config --local --remove-section credential # timeout=10
      ERROR: Error cloning remote repo 'origin'
      hudson.plugins.git.GitException: Command "git fetch --tags --progress https://example.com/example.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
      stdout: 
      stderr: fatal: unable to access 'https://example.com/example.git': Received HTTP code 407 from proxy after CONNECT
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1407)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1195)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:266)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:422)
      	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:848)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:881)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1254)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
      	at hudson.model.Run.execute(Run.java:1732)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:234)
      ERROR: null
      Finished: FAILURE
      

        Attachments

          Activity

          Hide
          ohtake_tomohiro OHTAKE Tomohiro added a comment -
          Show
          ohtake_tomohiro OHTAKE Tomohiro added a comment - I have created a pull request. https://github.com/jenkinsci/git-client-plugin/pull/141
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: OHTAKE Tomohiro
          Path:
          src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
          http://jenkins-ci.org/commit/git-client-plugin/227bd797c8f4e0fc7f48b047842ee4a0dbff33ab
          Log:
          [FIXED JENKINS-24112] Support authentication proxy

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: OHTAKE Tomohiro Path: src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java http://jenkins-ci.org/commit/git-client-plugin/227bd797c8f4e0fc7f48b047842ee4a0dbff33ab Log: [FIXED JENKINS-24112] Support authentication proxy
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mark Waite
          Path:
          src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
          http://jenkins-ci.org/commit/git-client-plugin/e7408fd3eb86c104f9ebb71888ae647dcb933190
          Log:
          Merge pull request #141 from ohtake/24112-authentication-proxy

          JENKINS-24112 Support authentication proxy

          Compare: https://github.com/jenkinsci/git-client-plugin/compare/30e87a3f4a61...e7408fd3eb86

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java http://jenkins-ci.org/commit/git-client-plugin/e7408fd3eb86c104f9ebb71888ae647dcb933190 Log: Merge pull request #141 from ohtake/24112-authentication-proxy JENKINS-24112 Support authentication proxy Compare: https://github.com/jenkinsci/git-client-plugin/compare/30e87a3f4a61...e7408fd3eb86
          Hide
          markewaite Mark Waite added a comment - - edited

          Change will be included in git client plugin 1.10.2 and later

          Show
          markewaite Mark Waite added a comment - - edited Change will be included in git client plugin 1.10.2 and later
          Hide
          markewaite Mark Waite added a comment -

          Reopening to correct my comment.

          Show
          markewaite Mark Waite added a comment - Reopening to correct my comment.
          Hide
          markewaite Mark Waite added a comment -

          Included in git-client-plugin 1.10.2, released 12 Sep 2014

          Show
          markewaite Mark Waite added a comment - Included in git-client-plugin 1.10.2, released 12 Sep 2014

            People

            • Assignee:
              markewaite Mark Waite
              Reporter:
              ohtake_tomohiro OHTAKE Tomohiro
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: