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

Git or Git Client Plugin Appending Additional Slash To Git SSH Url Scheme

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • OS: Windows 7 Enterprise 64bit
      JDK: 1.7.0_72-b32
      Jenkins: 1.595
      Plugins: Git, Git Client, Multiple SCM

      I'm having an issue right now trying to set up a Jenkins job (on one Windows server) to monitor an internal Git repo located on a on a different Windows server running ssh through Cygwin with Gitosis.

      The url looks like this: ssh://git@192.168.0.1:relative_path/repo.git (real values replaced for security). A relative path is the only path that will work. ~/ and an absolute path will not work because of how the server is configured.

      When running git clone from the command line with the url, everything comes out fine.

      When configuring a Git SCM in the Jenkins job it is able to run an ls-remote command (this confirms that the ssh keys are properly configured for the Jenkins instance). I've tried tweaking the url slightly and the background ls-remote command passes and fails accordingly.

      However when the job executes, the url appears to be rewritten with an additional forward slash in the scheme which causes the clone command to fail.

      Started by user Meh
      [EnvInject] - Loading node environment variables.
      Building in workspace D:\local_repo_test
       > git.exe rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > git.exe config remote.origin.url ssh:///git@192.168.0.1:relative_path/repo.git # timeout=10
      Fetching upstream changes from ssh:///git@192.168.0.1:relative_path/repo.git
       > git.exe --version # timeout=10
       > git.exe -c core.askpass=true fetch --tags --progress ssh:///git@192.168.0.1:relative_path/repo.git +refs/heads/*:refs/remotes/origin/*
      ERROR: Error fetching remote repo 'origin'
      ERROR: Error fetching remote repo 'origin'
      Finished: FAILURE
      

            ndeloof Nicolas De Loof
            timmyleahy Timmy Leahy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: