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

Extraneous Forward-Slash in ssh:// path to repository

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins version 1.598; Git plugin 2.3.4

      The SO question describes my exact problem down to the log file: http://stackoverflow.com/questions/27786733/why-is-the-git-plugin-for-jenkins-rewriting-my-local-git-repo-url-with-extra-sla

      [Repost Summary]
      -----------------------
      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 Gitosis server (on a different Windows server).

      The url looks like this: ssh://git@192.168.0.1:relative_path/repo.git (real values replaced for security, also the relative path will not work with a '~/', it only works without a leading '/').

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

      However when the job executes, the url appears to be rewritten with an additional forward slash 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
      It's the '///' that bothers me. Has anyone seen anything like this?

      Any help on this would be appreciated.

            Unassigned Unassigned
            nhvirtuoso Bryan Garretson
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: