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

git2: http+userpwd credentials fail on subsequent builds

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      git-client 1.4.0
      git-plugin 2.0-beta-3
    • Similar Issues:

      Description

      Testing with http repository + user/password credentials, a build on a blank workspace works, but a build on existing repository fails with

      Caused by: hudson.plugins.git.GitException: Failed to connect to http://my-git-repo-url
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1343)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:154)
      at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)

      If this can help, this git repository has restricted access, so reaching it without any authentication will fail.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
          http://jenkins-ci.org/commit/git-client-plugin/0176cb4de79d874dea0702d4080136c7d7800c09
          Log:
          [FIXED JENKINS-19974] failed to retrieve credentials on fetch

          Compare: https://github.com/jenkinsci/git-client-plugin/compare/1d294e98eea9...0176cb4de79d

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java http://jenkins-ci.org/commit/git-client-plugin/0176cb4de79d874dea0702d4080136c7d7800c09 Log: [FIXED JENKINS-19974] failed to retrieve credentials on fetch Compare: https://github.com/jenkinsci/git-client-plugin/compare/1d294e98eea9...0176cb4de79d
          Hide
          andor Andrew Golovkov added a comment -

          Same with git-client 1.4.3 and git-plugin 1.5.0
          Not resolved for me.

          Show
          andor Andrew Golovkov added a comment - Same with git-client 1.4.3 and git-plugin 1.5.0 Not resolved for me.
          Hide
          dirkvranckaert Dirk Vranckaert added a comment -

          As Andrew commented on this issue few weeks ago, this issue is still not fixed.
          I'm using the latest 'Jenkins GIT client plugin' and 'Jenkins GIT plugin'.

          This is a major problem for me because I cannot access my bitbucket repo with an url such as https://username@password:bitbucket.org/repo-owner/repo.git

          I need to have access to this URL because I want to do some pushing after the entire project has been built.

          A second option I tried was to configure credentials, then specify the repo in my project as https://bitbucket.org/repo-owner/repo.git (without username and password!!) and then select those credentials in 'Credentials' dropdown. However that gave me the exact same result:
          Failed to connect to repository : Failed to connect to https://username@bitbucket.org/repo-owner/repo.git (status = 404)

          I also tried setting up the SSH, but apparently Bitbucket only supports reading from a repo with the SSH configuration.

          I'm urgently looking for a solution as it is blocking for our project at this moment... Can you please provide some feedback and adapt the code bae if necessary?

          Show
          dirkvranckaert Dirk Vranckaert added a comment - As Andrew commented on this issue few weeks ago, this issue is still not fixed. I'm using the latest 'Jenkins GIT client plugin' and 'Jenkins GIT plugin'. This is a major problem for me because I cannot access my bitbucket repo with an url such as https://username@password:bitbucket.org/repo-owner/repo.git I need to have access to this URL because I want to do some pushing after the entire project has been built. A second option I tried was to configure credentials, then specify the repo in my project as https://bitbucket.org/repo-owner/repo.git (without username and password!!) and then select those credentials in 'Credentials' dropdown. However that gave me the exact same result: Failed to connect to repository : Failed to connect to https://username@bitbucket.org/repo-owner/repo.git (status = 404) I also tried setting up the SSH, but apparently Bitbucket only supports reading from a repo with the SSH configuration. I'm urgently looking for a solution as it is blocking for our project at this moment... Can you please provide some feedback and adapt the code bae if necessary?
          Hide
          jonathanb Jonathan Brecher added a comment -

          We are seeing the same failures. See log added to JENKINS-20533 (which might be a duplicate of this one?)

          Show
          jonathanb Jonathan Brecher added a comment - We are seeing the same failures. See log added to JENKINS-20533 (which might be a duplicate of this one?)
          Hide
          markewaite Mark Waite added a comment - - edited

          Using git-plugin 2.0.1 and git-client-plugin 1.6.2 I was able to access my bitbucket repository using the URL syntax https://username:password@bitbucket.org/markewaite/git-client-plugin.git . I checked that URL with a multi-configuration job that included Debian Testing, Debian Wheezy x64, Debian Wheezy x86, Windows 6.1 (Windows Home Server 2011), Windows 6.2 (Windows 8.1).

          I believe this bug is fixed. Could you check to confirm it?

          Show
          markewaite Mark Waite added a comment - - edited Using git-plugin 2.0.1 and git-client-plugin 1.6.2 I was able to access my bitbucket repository using the URL syntax https://username:password@bitbucket.org/markewaite/git-client-plugin.git . I checked that URL with a multi-configuration job that included Debian Testing, Debian Wheezy x64, Debian Wheezy x86, Windows 6.1 (Windows Home Server 2011), Windows 6.2 (Windows 8.1). I believe this bug is fixed. Could you check to confirm it?

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              vlatombe Vincent Latombe
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: