詹金斯 git 连接问题

时间:2021-01-05 02:35:29

标签: windows git github

您好,我正在尝试学习 jenkins 并进行一些测试。但我认为它无法连接到 git。我已经安装了 git plugin,并且 Git 可执行文件的路径被配置为 git.exe 路径。

我还能做些什么来使代码运行?

Started by user Onur Arca
Running as SYSTEM
Building in workspace C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\OnurSanityTest
The recommended git tool is: NONE
No credentials specified
 > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > C:\Program Files\Git\bin\git.exe config remote.origin.url https://github.com/techtorial/jenkinsTest.git # timeout=10
Fetching upstream changes from https://github.com/techtorial/jenkinsTest.git
 > C:\Program Files\Git\bin\git.exe --version # timeout=10
 > git --version # 'git version 2.29.2.windows.2'
 > C:\Program Files\Git\bin\git.exe fetch --tags --force --progress -- https://github.com/techtorial/jenkinsTest.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
Checking out Revision a220afe76c073ee16036a39bbdf4ea3ac19a153c (refs/remotes/origin/master)
 > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
 > C:\Program Files\Git\bin\git.exe checkout -f a220afe76c073ee16036a39bbdf4ea3ac19a153c # timeout=10
Commit message: "B6: add log4j properties"
 > C:\Program Files\Git\bin\git.exe rev-list --no-walk a220afe76c073ee16036a39bbdf4ea3ac19a153c # timeout=10
[OnurSanityTest] $ sh -xe C:\WINDOWS\TEMP\jenkins3311941570989726718.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:444)
    at java.lang.ProcessImpl.start(ProcessImpl.java:140)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "sh" (in directory "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\OnurSanityTest"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at hudson.Proc$LocalProc.<init>(Proc.java:252)
    at hudson.Proc$LocalProc.<init>(Proc.java:221)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)
    at hudson.Launcher$ProcStarter.start(Launcher.java:508)
    at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:143)
    at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:91)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
    at hudson.model.Build$BuildExecution.build(Build.java:197)
    at hudson.model.Build$BuildExecution.doRun(Build.java:163)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
    at hudson.model.Run.execute(Run.java:1907)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute shell' marked build as failure
Finished: FAILURE

0 个答案:

没有答案