{"id":2006,"date":"2017-12-07T07:55:05","date_gmt":"2017-12-07T07:55:05","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2006"},"modified":"2021-11-18T07:05:59","modified_gmt":"2021-11-18T07:05:59","slug":"git-polling-log-java-io-ioexception-error2-no-such-file-or-director","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/git-polling-log-java-io-ioexception-error2-no-such-file-or-director\/","title":{"rendered":"Git Error: -Git Polling Log java.io.IOException: error=2, No such file or director"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Git Polling Log java.io.IOException: error=2, No such file or director<\/strong><br>\nError<br>\nStarted on Sep 15, 2015 9:57:00 AM<br>\nUsing strategy: Default<br>\n[poll] Last Built Revision: Revision 2c06c1d705f61e2654d7f30131d8205d6b755d09 (refs\/remotes\/origin\/master)<br>\n&gt; \/mnt\/jenkins\/git\/2.3.1\/bin\/git &#8211;version # timeout=10<br>\n&gt; \/mnt\/jenkins\/git\/2.3.1\/bin\/git ls-remote -h server.com\/repo-provisioning.git master # timeout=10<br>\nFATAL: hudson.plugins.git.GitException: Error performing command: \/mnt\/jenkins\/git\/2.3.1\/bin\/git ls-remote -h replica.int.devsnc.com\/devsnc-provisioning.git master<br>\nhudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: \/mnt\/jenkins\/git\/2.3.1\/bin\/git ls-remote -h http:\/\/server\/repo-provisioning.git master<br>\nat hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:527)<br>\nat hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:384)<br>\nat hudson.scm.SCM.poll(SCM.java:401)<br>\nat hudson.model.AbstractProject._poll(AbstractProject.java:1433)<br>\nat hudson.model.AbstractProject.poll(AbstractProject.java:1336)<br>\nat hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515)<br>\nat hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544)<br>\nat hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)<br>\nat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)<br>\nat java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)<br>\nat java.util.concurrent.FutureTask.run(FutureTask.java:138)<br>\nat java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)<br>\nat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)<br>\nat java.lang.Thread.run(Thread.java:662)<br>\nCaused by: hudson.plugins.git.GitException: Error performing command: \/mnt\/jenkins\/git\/2.3.1\/bin\/git ls-remote -h http:\/\/server\/repo-provisioning.git master<br>\nat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1464)<br>\nat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1245)<br>\nat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1143)<br>\nat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1134)<br>\nat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2139)<br>\nat hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:576)<br>\nat hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:525)<br>\n&#8230; 13 more<br>\nCaused by: java.io.IOException: Cannot run program &#8220;\/mnt\/jenkins\/git\/2.3.1\/bin\/git&#8221;: java.io.IOException: error=2, No such file or directory<br>\nat java.lang.ProcessBuilder.start(ProcessBuilder.java:470)<br>\nat hudson.Proc$LocalProc.(Proc.java:244)<br>\nat hudson.Proc$LocalProc.(Proc.java:216)<br>\nat hudson.Launcher$LocalLauncher.launch(Launcher.java:803)<br>\nat hudson.Launcher$ProcStarter.start(Launcher.java:381)<br>\nat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1453)<br>\n&#8230; 19 more<br>\nCaused by: java.io.IOException: java.io.IOException: error=2, No such file or directory<br>\nat java.lang.UNIXProcess.(UNIXProcess.java:148)<br>\nat java.lang.ProcessImpl.start(ProcessImpl.java:65)<br>\nat java.lang.ProcessBuilder.start(ProcessBuilder.java:452)<br>\n&#8230; 24 more<br>\nDone. Took 21 ms<br>\nNo changes<\/p>\n<p>Solution &#8211;<br>\nA work around of adding the &#8220;Force polling using workspace&#8221; as an &#8220;Additional behaviour&#8221; in your git SCM definition of the windows job.<br>\nRegards,<br>\nRajesh Kumar<br>\nTwitt me @ twitter.com\/RajeshKumarIn<\/p>\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_51665\"><iframe loading=\"lazy\"  id=\"_ytid_42443\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_51665\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Git Polling Log java.io.IOException: error=2, No such file or director Error Started on Sep 15, 2015 9:57:00 AM Using strategy: Default [poll] Last Built Revision: Revision&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[42],"tags":[160],"class_list":["post-2006","post","type-post","status-publish","format-standard","hentry","category-jenkins","tag-git"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2006"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2006\/revisions"}],"predecessor-version":[{"id":25704,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2006\/revisions\/25704"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}