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

Relative paths to git reference repo for submodules throws exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • git-client-plugin
    • None
    • Jenkins 2.286, Git plugin 4.7.1, Git client plugin 3.7.1

      Steps to reproduce:

      • Set up a reference repository in the build node's remote root directory under refrepo/my_repo.git
      • Configure a new job to use this reference repo both during clone and submodule update:
      • Start a build. Gives the following output:
         
        The recommended git tool is: NONE
        using credential ****
        Cloning the remote Git repository
        Cloning repository ssh://git@****/my_repo.git
         > git init /home/**** # timeout=10
        Using reference repository: refrepo/my_repo.git
        Fetching upstream changes from ssh://git@****/my_repo.git
         > git --version # timeout=10
         > git --version # 'git version 2.7.4'
        using GIT_SSH to set credentials SSH Key for accessing ****
         > git fetch --tags --progress ssh://git@****/my_repo.git +refs/heads/*:refs/remotes/origin/* # timeout=10
        Avoid second fetch
        Checking out Revision **** (main)
        Commit message: "****"
         > git config remote.origin.url ssh://git@****/my_repo.git # timeout=10
         > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
         > git config core.sparsecheckout # timeout=10
         > git checkout -f **** # timeout=10
         > git rev-list --no-walk **** # timeout=10
        hudson.plugins.git.GitException: Command "git submodule update --reference refrepo/my_repo.git modules/my_submodule" returned status code 128:
        stdout: 
        stderr: Cloning into 'modules/my_submodule'...
        fatal: Could not switch to 'refrepo/': No such file or directory
        fatal: clone of 'ssh://git@****/my_submodule.git' into submodule path 'modules/my_submodule' failed
        

      I'm not sure if relative paths to reference repositories are supposed to work/supported in the Git client plugin, but I find this inconsistency between clone and submodule update odd.

            Unassigned Unassigned
            sixten Sixten
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: