hudson.plugins.git.GitException: Command "git submodule update --init --recursive" returned status code 1: stdout: Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/libbmp/.git/ Submodule path 'libs/libbmp': checked out 'cf1c4e134a50d8e667f8db9f2ff5c19e97e80256' Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/mediaplayer/.git/ stderr: fatal: reference is not a tree: 885b6998613918fa1d333f8741f2735cc542097a Unable to checkout '885b6998613918fa1d333f8741f2735cc542097a' in submodule path 'libs/mediaplayer'

Jenkins JIRA | Owen Carter | 3 years ago
  1. 0

    We use submodules in our Git build, and have the submodule checkout option selected; but if these fail to checkout the build fails (git crashes) without sending mail notification. It's not too hard for a developer to break a build like this if they forget to push the submodule at the same time as they push the master repo. It would be good if this was notified properly as a failure so that the devs can see the breakage immediately instead of realizing later that the job has started failing without notifying anybody. -------------- edited transcript; Note: we have a prebuild step that completed successfully before the repo +submodules checkouts start. {noformat}Started by remote host avn-gitlab.ictv.com with note: ..snip.. [EnvInject] - Loading node environment variables. Building remotely on _SCM in workspace /snip Running Prebuild steps [] $ /bin/sh -xe /tmp/hudson6376592122742609814.sh <snip..> Success build forhudson.tasks.Shell@4d6ce481 Checkout:virga-ms / /usr/local/builds/CI/H5/virga-ms - hudson.remoting.Channel@6cd5274:_SCM-CentOS-6.4-Build-Slave-03 Using strategy: Default Last Built Revision: Revision 7c28bf189abbd8c2800aa12d3abaedd015bb4381 (origin/mediasource) Wiping out workspace first. Cloning the remote Git repository Cloning repository git@avn-gitlab.ictv.com:html5server.git git --version git version 1.7.1 Fetching upstream changes from origin Commencing build of Revision ff9ab38e606f65d275050bc9f0d2a26b0451f2d6 (origin/mediasource) Checking out Revision ff9ab38e606f65d275050bc9f0d2a26b0451f2d6 (origin/mediasource) FATAL: Command "git submodule update --init --recursive" returned status code 1: stdout: Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/libbmp/.git/ Submodule path 'libs/libbmp': checked out 'cf1c4e134a50d8e667f8db9f2ff5c19e97e80256' Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/mediaplayer/.git/ stderr: fatal: reference is not a tree: 885b6998613918fa1d333f8741f2735cc542097a Unable to checkout '885b6998613918fa1d333f8741f2735cc542097a' in submodule path 'libs/mediaplayer' hudson.plugins.git.GitException: Command "git submodule update --init --recursive" returned status code 1: stdout: Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/libbmp/.git/ Submodule path 'libs/libbmp': checked out 'cf1c4e134a50d8e667f8db9f2ff5c19e97e80256' Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/mediaplayer/.git/ stderr: fatal: reference is not a tree: 885b6998613918fa1d333f8741f2735cc542097a Unable to checkout '885b6998613918fa1d333f8741f2735cc542097a' in submodule path 'libs/mediaplayer' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:790) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:756) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.submoduleUpdate(CliGitAPIImpl.java:429) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1235) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1205) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:679) {noformat} ----------- And that is where the build log ends; on the git error stacktrace, no attempt is made to send a failure notification.

    Jenkins JIRA | 3 years ago | Owen Carter
    hudson.plugins.git.GitException: Command "git submodule update --init --recursive" returned status code 1: stdout: Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/libbmp/.git/ Submodule path 'libs/libbmp': checked out 'cf1c4e134a50d8e667f8db9f2ff5c19e97e80256' Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/mediaplayer/.git/ stderr: fatal: reference is not a tree: 885b6998613918fa1d333f8741f2735cc542097a Unable to checkout '885b6998613918fa1d333f8741f2735cc542097a' in submodule path 'libs/mediaplayer'
  2. 0

    We use submodules in our Git build, and have the submodule checkout option selected; but if these fail to checkout the build fails (git crashes) without sending mail notification. It's not too hard for a developer to break a build like this if they forget to push the submodule at the same time as they push the master repo. It would be good if this was notified properly as a failure so that the devs can see the breakage immediately instead of realizing later that the job has started failing without notifying anybody. -------------- edited transcript; Note: we have a prebuild step that completed successfully before the repo +submodules checkouts start. {noformat}Started by remote host avn-gitlab.ictv.com with note: ..snip.. [EnvInject] - Loading node environment variables. Building remotely on _SCM in workspace /snip Running Prebuild steps [] $ /bin/sh -xe /tmp/hudson6376592122742609814.sh <snip..> Success build forhudson.tasks.Shell@4d6ce481 Checkout:virga-ms / /usr/local/builds/CI/H5/virga-ms - hudson.remoting.Channel@6cd5274:_SCM-CentOS-6.4-Build-Slave-03 Using strategy: Default Last Built Revision: Revision 7c28bf189abbd8c2800aa12d3abaedd015bb4381 (origin/mediasource) Wiping out workspace first. Cloning the remote Git repository Cloning repository git@avn-gitlab.ictv.com:html5server.git git --version git version 1.7.1 Fetching upstream changes from origin Commencing build of Revision ff9ab38e606f65d275050bc9f0d2a26b0451f2d6 (origin/mediasource) Checking out Revision ff9ab38e606f65d275050bc9f0d2a26b0451f2d6 (origin/mediasource) FATAL: Command "git submodule update --init --recursive" returned status code 1: stdout: Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/libbmp/.git/ Submodule path 'libs/libbmp': checked out 'cf1c4e134a50d8e667f8db9f2ff5c19e97e80256' Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/mediaplayer/.git/ stderr: fatal: reference is not a tree: 885b6998613918fa1d333f8741f2735cc542097a Unable to checkout '885b6998613918fa1d333f8741f2735cc542097a' in submodule path 'libs/mediaplayer' hudson.plugins.git.GitException: Command "git submodule update --init --recursive" returned status code 1: stdout: Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/libbmp/.git/ Submodule path 'libs/libbmp': checked out 'cf1c4e134a50d8e667f8db9f2ff5c19e97e80256' Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/mediaplayer/.git/ stderr: fatal: reference is not a tree: 885b6998613918fa1d333f8741f2735cc542097a Unable to checkout '885b6998613918fa1d333f8741f2735cc542097a' in submodule path 'libs/mediaplayer' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:790) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:756) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.submoduleUpdate(CliGitAPIImpl.java:429) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1235) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1205) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:679) {noformat} ----------- And that is where the build log ends; on the git error stacktrace, no attempt is made to send a failure notification.

    Jenkins JIRA | 3 years ago | Owen Carter
    hudson.plugins.git.GitException: Command "git submodule update --init --recursive" returned status code 1: stdout: Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/libbmp/.git/ Submodule path 'libs/libbmp': checked out 'cf1c4e134a50d8e667f8db9f2ff5c19e97e80256' Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/mediaplayer/.git/ stderr: fatal: reference is not a tree: 885b6998613918fa1d333f8741f2735cc542097a Unable to checkout '885b6998613918fa1d333f8741f2735cc542097a' in submodule path 'libs/mediaplayer'
  3. 0

    How to track down a Jenkins failure to checkout git submodule over ssh?

    Stack Overflow | 3 years ago
    hudson.plugins.git.GitException: Command "git submodule update --init --recursive" returned status code 1: stdout: Cloning into 'platform/web-app/WEB-INF/learning'... stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Clone of 'git@bitbucket.org:xxxxxxxx/xxxxxx.git' into submodule path 'platform/web-app/WEB-INF/learning' failed
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JENKINS-20941] Stored git credentials not used when submodule is updated - Jenkins JIRA

    jenkins-ci.org | 1 year ago
    hudson.plugins.git.GitException: Command "submodule update" returned status code 1: stdout: stderr: remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/xxx.git/' Unable to fetch in submodule path 'xxx'
  6. 0

    EPICS Version 4 / Mailing Lists

    sourceforge.net | 1 year ago
    hudson.plugins.git.GitException: Command "git submodule update --init --recursive" returned status code 1: stdout: Submodule path 'ADPvCam': checked out '5dc906ca2a57df86dc37c4aed251331ebbf89501' stderr: From ea673d7..5dc906c master -> origin/master fatal: reference is not a tree: a9d0e9a60fc295076d83486e3cc6bdc70866b07b Unable to checkout 'a9d0e9a60fc295076d83486e3cc6bdc70866b07b' in submodule path 'ADRoper'

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Command "git submodule update --init --recursive" returned status code 1: stdout: Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/libbmp/.git/ Submodule path 'libs/libbmp': checked out 'cf1c4e134a50d8e667f8db9f2ff5c19e97e80256' Initialized empty Git repository in /usr/local/builds/CI/H5/virga-ms/virga-ms/libs/mediaplayer/.git/ stderr: fatal: reference is not a tree: 885b6998613918fa1d333f8741f2735cc542097a Unable to checkout '885b6998613918fa1d333f8741f2735cc542097a' in submodule path 'libs/mediaplayer'

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      CliGitAPIImpl.submoduleUpdate
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:790)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:756)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.submoduleUpdate(CliGitAPIImpl.java:429)
      3 frames
    3. Hudson GIT plugin
      GitSCM$4.invoke
      1. hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1235)
      2. hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1205)
      2 frames
    4. Hudson
      FilePath$FileCallableWrapper.call
      1. hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417)
      1 frame
    5. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:326)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      4 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      5. java.lang.Thread.run(Thread.java:679)
      5 frames