我有一個jenkins實例,它連接了一個windows從屬機器。我也有一個運行在github上的工作,我有觸發器 - 「將更改推送到GitHub時創建」。Github-Jenkins從屬觸發問題
當我向github推送更改時,jenkins上沒有觸發構建。我檢查,看看有效載荷也獲得tranferred在「Github的鉤日誌」詹金斯,但我得到了以下錯誤:
Started on Sep 18, 2014 3:57:06 PM
Using strategy: Default
[poll] Last Built Revision: Revision ce6a183e834a3e31afa0eb83a4418b0619c8642b (origin/master)
> "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master # timeout=10
FATAL: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:462)
at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357)
at hudson.scm.SCM.poll(SCM.java:374)
at hudson.model.AbstractProject._poll(AbstractProject.java:1428)
at hudson.model.AbstractProject.poll(AbstractProject.java:1331)
at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73)
at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:98)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
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 java.lang.Thread.run(Thread.java:744)
Caused by: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1444)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1225)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1138)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1129)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2059)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:495)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:460)
... 13 more
Caused by: java.io.IOException: Cannot run program ""C:\Program Files (x86)\Git\cmd\git.exe"": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:780)
at hudson.Launcher$ProcStarter.start(Launcher.java:360)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1433)
... 19 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 24 more
基本上抱怨不能夠運行命令C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
但作爲我手動進入我的奴隸機器並運行命令,它工作正常。
請注意, 1.我做了調整jenkins奴隸服務作爲管理員登錄,因此它具有所有權限。 2.我的默認詹金斯服務器是一個Linux機箱,從機是一個窗口框。顯然,兩者都有不同的git可執行文件路徑。所以我想知道如果jenkins因爲某些原因在我的linux機器上運行這個命令。
我有項目設置,讓系統只從窗戶框運行,因爲它建立罰款(所以它是能夠找到適合工作的git的可執行文件)
任何指針工作正常?
也沒有人知道jenkins的github插件如何與slave機器一起工作(它是否在奴隸中尋找git或者它是否去jenkins駐留的地方,因爲這可能是源,儘管不知道解決方案是什麼那奇怪的情況是?)