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



    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • git-plugin
    • None
    • Linux master server using either master node or any Linux slave agent


      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:
      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.



          markewaite Mark Waite created issue -
          scm_issue_link SCM/JIRA link daemon made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          markewaite Mark Waite made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          markewaite Mark Waite made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Resolved [ 5 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 147743 ] JNJira + In-Review [ 206431 ]


            ndeloof Nicolas De Loof
            markewaite Mark Waite
            1 Vote for this issue
            4 Start watching this issue