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

Misconfiguration of submodules not clearly reported by git plugin

XMLWordPrintable

      I'm trying to clone a git repository that is hosted on a Atlassian Stash instance.
      The special case about the repository is that it has several submodules in it.

      Here is what I did to get to the error:
      1) I installed the latest git-plugin (2.4.0) / git-client-plugin (1.19.0) in Jenkins
      2) setup a ssh rsa key in Stash
      3) configured a Jenkins job to clone the repository from the Stash remote host (via ssh://)
      4) configured the ssh key & credentials in the Jenkins job git-plugin settings

      now when I run the build, Jenkins sucessfully clones the top-level git repository, but fails when trying to update the submodules (the error looks like Jenkins is trying to read username & password from a CLI, but only for the submodules)

      Gestartet durch Benutzer anonymous
      Baue in Arbeitsbereich C:\Program Files (x86)\Jenkins\jobs\test node\workspace
      No JDK named 'null' found
      No JDK named 'null' found
       > 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@jenkinshost:7999/ipp/ipp-project.git # timeout=10
      Fetching upstream changes from ssh://git@jenkinshost:7999/ipp/ipp-project.git
       > git.exe --version # timeout=10
      using GIT_SSH to set credentials 
       > git.exe -c core.askpass=true fetch --tags --progress ssh://git@jenkinshost:7999/ipp/ipp-project.git +refs/heads/*:refs/remotes/origin/*
       > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
       > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
      Checking out Revision a27c48024088c36e6eff3420c699ea1d1977e5cd (refs/remotes/origin/master)
      No JDK named 'null' found
       > git.exe config core.sparsecheckout # timeout=10
       > git.exe checkout -f a27c48024088c36e6eff3420c699ea1d1977e5cd
       > git.exe rev-list a27c48024088c36e6eff3420c699ea1d1977e5cd # timeout=10
       > git.exe remote # timeout=10
       > git.exe submodule init # timeout=10
       > git.exe submodule sync # timeout=10
       > git.exe config --get remote.origin.url # timeout=10
       > git.exe submodule update
      FATAL: Command "git.exe submodule update" returned status code 1:
      stdout: 
      stderr: Cloning into 'apps/ipp-app'...
      error: cannot spawn echo : No such file or directory
      bash: /dev/tty: No such device or address
      error: failed to execute prompt script (exit code 1)
      fatal: could not read Username for 'http://jenkinshost:7990': No error
      Clone of 'http://jenkinshost:7990/scm/ipp/ipp-app.git' into submodule path 'apps/ipp-app' failed
      
      hudson.plugins.git.GitException: Command "git.exe submodule update" returned status code 1:
      stdout: 
      stderr: Cloning into 'apps/ipp-app'...
      error: cannot spawn echo : No such file or directory
      bash: /dev/tty: No such device or address
      error: failed to execute prompt script (exit code 1)
      fatal: could not read Username for 'http://jenkinshost:7990': No error
      Clone of 'http://jenkinshost:7990/scm/ipp/ipp-app.git' into submodule path 'apps/ipp-app' failed
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:62)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$6.execute(CliGitAPIImpl.java:904)
      	at hudson.plugins.git.extensions.impl.SubmoduleOption.onCheckoutCompleted(SubmoduleOption.java:83)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1074)
      	at hudson.scm.SCM.checkout(SCM.java:485)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1275)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      	at hudson.model.Run.execute(Run.java:1741)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Finished: FAILURE
      

            Unassigned Unassigned
            drywolf Wolfgang Steiner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: