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

Git 1.2: only one remote is actually added

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • Ubuntu 12.04

      I have a project configured with two remotes. One uses SSH and the other uses HTTPS:

      ssh://site-user@platinum.example.org/opt/site
      https://git.example.org/site.git

      Both of these work from the command-line (e.g. "git clone …") and both worked with 1.1.26. With 1.2, only the SSH remote is added (e.g. "git remote show" will only list that remote – and it's always the SSH remote, no matter what order I create the remotes in the config.

      Builds will fail with this error:

      git --version
      git version 1.8.1.5
      Fetching upstream changes from ssh-remote
      Fetching upstream changes from https-remote
      ERROR: Problem fetching from https-remote / https-remote - could be unavailable. Continuing anyway.
      hudson.plugins.git.GitException: Command "git fetch -t https-remote +refs/heads/*:refs/remotes/https-remote/*" returned status code 128:
      stdout: 
      stderr: fatal: 'https-remote' does not appear to be a git repository
      fatal: Could not read from remote repository.
      
      Please make sure you have the correct access rights
      and the repository exists.
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:160)
      	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1023)
      	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:941)
      	at hudson.FilePath.act(FilePath.java:865)
      	at hudson.FilePath.act(FilePath.java:838)
      	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:941)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1113)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1342)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588)
      	at hudson.model.Run.execute(Run.java:1567)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:237)
      

      I've reverted back to 1.1.26 for the moment.

            ndeloof Nicolas De Loof
            acdha acdha
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: