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

Specifying multiple git repositories to git plugin causes "git fetch" to fail on all repos after first repo

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      Linux master server using either master node or any Linux slave agent
    • Similar Issues:

      Description

      If I specify multiple git repositories to the git plugin by clicking the "Add" button in the "Repositories" area of the git section of the job configuration screen, then the "git fetch" for each added repository will fail with the message that the remote repository being fetched is invalid.

      In this example, I assigned the name "origin-mwaite1" to the second repository.

      ERROR: Problem fetching from origin-mwaite1 / origin-mwaite1 - could be unavailable. Continuing anyway
      hudson.plugins.git.GitException: Command "git fetch -t origin-mwaite1 +refs/heads/:refs/remotes/origin-mwaite1/" returned status code 128:
      stdout:
      stderr: fatal: 'origin-mwaite1' does not appear to be a git repository
      fatal: The remote end hung up unexpectedly

      I suspect the plugin has missed the necessary step of defining the remote repository with "git remote add" if the remote is not already defined in the working repository.

      This is only using the Git plugin, not any other plugin. This is not related to any "multiple SCM" plugin topics, nor to any interaction between other plugins and the Git plugin.

        Attachments

          Activity

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              markewaite Mark Waite
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: