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

Jenkins JIRA | OHTAKE Tomohiro | 3 years ago
  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!
  3. 0

    [PDI-10463] MongoDB Plugin is not being assembled into PDI EE CI - Pentaho BI Platform Tracking

    pentaho.com | 1 year ago
    hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/ :refs/remotes/origin/ " returned status code 128: stdout: stderr: ERROR: Repository not found. fatal: The remote end hung up unexpectedly
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We are getting a lot of these errors: ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from git@gitlab:xxx/main.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136) at hudson.model.Run.execute(Run.java:1738) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: hudson.plugins.git.GitException: Command "/home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git -c core.askpass=true fetch --no-tags --progress git@gitlab.xxx.com:xxx/main.git +refs/heads/master:refs/remotes/origin/master" returned status code 128: stdout: stderr: error: refs/remotes/origin/xxxx does not point to a valid object! ..... fatal: pack has 120 unresolved deltas fatal: index-pack failed at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at hudson.remoting.Engine$1$1.run(Engine.java:85) at java.lang.Thread.run(Thread.java:745) at ......remote call to build133(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) at sun.reflect.GeneratedMethodAccessor267.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) at com.sun.proxy.$Proxy47.execute(Unknown Source) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:808) ... 12 more ERROR: null So I set the Refspec to +refs/heads/master:refs/remotes/origin/master But when it does a fresh checkout (clean workspace), the plugin does this: Notice: +refs/heads/*:refs/remotes/origin/* Cloning the remote Git repository Avoid fetching tags Cloning repository git@gitlab.cj.com:cjdev/main.git > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git init /home/cruise/workspace/Start # timeout=10 Fetching upstream changes from git@gitlab.cj.com:cjdev/main.git > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git --version # timeout=10 using GIT_SSH to set credentials > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git -c core.askpass=true fetch --no-tags --progress git@gitlab.cj.com:cjdev/main.git +refs/heads/*:refs/remotes/origin/* > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git config remote.origin.url git@gitlab.cj.com:cjdev/main.git # timeout=10 > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git config remote.origin.url git@gitlab.cj.com:cjdev/main.git # timeout=10 Fetching upstream changes from git@gitlab.cj.com:cjdev/main.git using GIT_SSH to set credentials > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git -c core.askpass=true fetch --no-tags --progress git@gitlab.cj.com:cjdev/main.git +refs/heads/master:refs/remotes/origin/master > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git rev-parse refs/remotes/origin/refs/heads/master^{commit} # timeout=10 Checking out Revision b1232ff60185766b8b94dabcc20f147e25ae9aab (refs/remotes/origin/master) > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git config core.sparsecheckout # timeout=10 > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git checkout -f b1232ff60185766b8b94dabcc20f147e25ae9aab > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git rev-list 96dd700f85eb3dc07319d302e930053774c86bfc # timeout=10 which I think is what is causing the error when anything from the origin disappears. Using latest of git plugin, and shared library plugin.

    Jenkins JIRA | 6 months ago | Allon Bendavid
    hudson.plugins.git.GitException: Failed to fetch from git@gitlab:xxx/main.git
  6. 0

    We are getting a lot of these errors: ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from git@gitlab:xxx/main.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136) at hudson.model.Run.execute(Run.java:1738) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: hudson.plugins.git.GitException: Command "/home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git -c core.askpass=true fetch --no-tags --progress git@gitlab.xxx.com:xxx/main.git +refs/heads/master:refs/remotes/origin/master" returned status code 128: stdout: stderr: error: refs/remotes/origin/xxxx does not point to a valid object! ..... fatal: pack has 120 unresolved deltas fatal: index-pack failed at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at hudson.remoting.Engine$1$1.run(Engine.java:85) at java.lang.Thread.run(Thread.java:745) at ......remote call to build133(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) at sun.reflect.GeneratedMethodAccessor267.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) at com.sun.proxy.$Proxy47.execute(Unknown Source) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:808) ... 12 more ERROR: null So I set the Refspec to +refs/heads/master:refs/remotes/origin/master But when it does a fresh checkout (clean workspace), the plugin does this: Notice: +refs/heads/*:refs/remotes/origin/* Cloning the remote Git repository Avoid fetching tags Cloning repository git@gitlab.cj.com:cjdev/main.git > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git init /home/cruise/workspace/Start # timeout=10 Fetching upstream changes from git@gitlab.cj.com:cjdev/main.git > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git --version # timeout=10 using GIT_SSH to set credentials > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git -c core.askpass=true fetch --no-tags --progress git@gitlab.cj.com:cjdev/main.git +refs/heads/*:refs/remotes/origin/* > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git config remote.origin.url git@gitlab.cj.com:cjdev/main.git # timeout=10 > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git config remote.origin.url git@gitlab.cj.com:cjdev/main.git # timeout=10 Fetching upstream changes from git@gitlab.cj.com:cjdev/main.git using GIT_SSH to set credentials > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git -c core.askpass=true fetch --no-tags --progress git@gitlab.cj.com:cjdev/main.git +refs/heads/master:refs/remotes/origin/master > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git rev-parse refs/remotes/origin/refs/heads/master^{commit} # timeout=10 Checking out Revision b1232ff60185766b8b94dabcc20f147e25ae9aab (refs/remotes/origin/master) > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git config core.sparsecheckout # timeout=10 > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git checkout -f b1232ff60185766b8b94dabcc20f147e25ae9aab > /home/cruise/tools/hudson.plugins.git.GitTool/git-2.7.1/git rev-list 96dd700f85eb3dc07319d302e930053774c86bfc # timeout=10 which I think is what is causing the error when anything from the origin disappears. Using latest of git plugin, and shared library plugin.

    Jenkins JIRA | 6 months ago | Allon Bendavid
    hudson.plugins.git.GitException: Failed to fetch from git@gitlab:xxx/main.git

    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

      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