欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Jenkins java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。

程序员文章站 2022-05-13 20:03:21
...

Started by user sa
Building in workspace C:\Users\Administrator\.jenkins\workspace\HelloWorld
Updating https://USER-20170820BE/svn/otherPro/trunk/HelloWorld at revision '2017-11-04T13:12:35.020 +0800'
Using sole credentials sa/****** in realm ‘<https://user-20170820be:443> VisualSVN Server’
At revision 3

No changes for https://user-20170820be/svn/otherPro/trunk/HelloWorld since the previous build
[HelloWorld] $ sh -xe C:\Users\ADMINI~1\AppData\Local\Temp\jenkins4672109461262154375.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
	at java.lang.ProcessImpl.start(ProcessImpl.java:137)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "sh" (in directory "C:\Users\Administrator\.jenkins\workspace\HelloWorld"): CreateProcess error=2, 系统找不到指定的文件。
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at hudson.Proc$LocalProc.<init>(Proc.java:249)
	at hudson.Proc$LocalProc.<init>(Proc.java:218)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:930)
	at hudson.Launcher$ProcStarter.start(Launcher.java:450)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
	at hudson.model.Build$BuildExecution.build(Build.java:206)
	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:496)
	at hudson.model.Run.execute(Run.java:1737)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:421)
Build step 'Execute shell' marked build as failure
Finished: FAILURE

解决方案:

https://*.com/questions/15135771/hudson-on-windows-error-java-io-ioexception-cannot-run-program-sh

上一篇: 百字令·薇

下一篇: npm run传递参数