hudson.plugins.git.GitException: No remotes found!

Jenkins JIRA | OHTAKE Tomohiro | 3 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    h5. Steps to reproduce # Create a free-style project. # Set "Git Repository URL". The repository specified should use submodules. # In "Additional Behaviours", add "Advanced sub-modules behaviours" and check "Recursively update submodules". # Build it. h5. Expected result Workspace should have git working tree and submodules. h5. Actual console log {code} Cloning the remote Git repository Cloning repository git://***/*.git Fetching upstream changes from git://***/*.git Fetching upstream changes from git://***/*.git Checking out Revision 0123456789abcdef0123456789abcdef01234567 (origin/master) FATAL: No remotes found! hudson.plugins.git.GitException: No remotes found! at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getDefaultRemote(CliGitAPIImpl.java:702) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.setupSubmoduleUrls(CliGitAPIImpl.java:863) at hudson.plugins.git.extensions.impl.SubmoduleOption.onCheckoutCompleted(SubmoduleOption.java:69) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:882) at hudson.model.AbstractProject.checkout(AbstractProject.java:1256) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494) at hudson.model.Run.execute(Run.java:1502) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) {code} h5. Actual .git/config {code} [core] repositoryformatversion = 0 filemode = false logallrefupdates = true {code} There is no [remote "origin"] nor [submodule "submodule-name"] sections. h5. Workaround One of the followings: * Downgrade git plugin to 1.5 * Do not check "Recursively update submodules" * Do not checkout git repository with submodules * Create a shell build step with: git submodule update --init --recursive

    Jenkins JIRA | 3 years ago | OHTAKE Tomohiro
    hudson.plugins.git.GitException: No remotes found!
  2. 0

    h5. Steps to reproduce # Create a free-style project. # Set "Git Repository URL". The repository specified should use submodules. # In "Additional Behaviours", add "Advanced sub-modules behaviours" and check "Recursively update submodules". # Build it. h5. Expected result Workspace should have git working tree and submodules. h5. Actual console log {code} Cloning the remote Git repository Cloning repository git://***/*.git Fetching upstream changes from git://***/*.git Fetching upstream changes from git://***/*.git Checking out Revision 0123456789abcdef0123456789abcdef01234567 (origin/master) FATAL: No remotes found! hudson.plugins.git.GitException: No remotes found! at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getDefaultRemote(CliGitAPIImpl.java:702) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.setupSubmoduleUrls(CliGitAPIImpl.java:863) at hudson.plugins.git.extensions.impl.SubmoduleOption.onCheckoutCompleted(SubmoduleOption.java:69) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:882) at hudson.model.AbstractProject.checkout(AbstractProject.java:1256) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494) at hudson.model.Run.execute(Run.java:1502) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) {code} h5. Actual .git/config {code} [core] repositoryformatversion = 0 filemode = false logallrefupdates = true {code} There is no [remote "origin"] nor [submodule "submodule-name"] sections. h5. Workaround One of the followings: * Downgrade git plugin to 1.5 * Do not check "Recursively update submodules" * Do not checkout git repository with submodules * Create a shell build step with: git submodule update --init --recursive

    Jenkins JIRA | 3 years ago | OHTAKE Tomohiro
    hudson.plugins.git.GitException: No remotes found!

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      No remotes found!

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getDefaultRemote()
    2. org.jenkinsci.plugins
      CliGitAPIImpl.setupSubmoduleUrls
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getDefaultRemote(CliGitAPIImpl.java:702)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.setupSubmoduleUrls(CliGitAPIImpl.java:863)
      2 frames
    3. hudson.plugins.git
      SubmoduleOption.onCheckoutCompleted
      1. hudson.plugins.git.extensions.impl.SubmoduleOption.onCheckoutCompleted(SubmoduleOption.java:69)
      1 frame
    4. Hudson GIT plugin
      GitSCM.checkout
      1. hudson.plugins.git.GitSCM.checkout(GitSCM.java:882)
      1 frame
    5. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
      2 frames
    6. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
      2. hudson.model.Run.execute(Run.java:1502)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      4. hudson.model.ResourceController.execute(ResourceController.java:88)
      5. hudson.model.Executor.run(Executor.java:236)
      5 frames