jenkins初始化的时候报错

来源:8-2 cicd实践(1)

慕虎7937911

2020-02-24

Started by user admin
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /root/.jenkins/workspace/k8s-web-demo
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Preparation)
[Pipeline] git
No credentials specified
Cloning the remote Git repository
Cloning repository https://git.imooc.com/coding-335/mooc-k8s-demo-docker.git

git init /root/.jenkins/workspace/k8s-web-demo # timeout=10
ERROR: Error cloning remote repo 'origin’
hudson.plugins.git.GitException: Could not init /root/.jenkins/workspace/k8s-web-demo
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:989)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl2.execute(CliGitAPIImpl.java:747)athudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1114)athudson.plugins.git.GitSCM.checkout(GitSCM.java:1159)atorg.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)atorg.jenkinsci.plugins.workflow.steps.scm.SCMStep2.execute(CliGitAPIImpl.java:747) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1114) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1159) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep2.execute(CliGitAPIImpl.java:747)athudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1114)athudson.plugins.git.GitSCM.checkout(GitSCM.java:1159)atorg.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)atorg.jenkinsci.plugins.workflow.steps.scm.SCMStepStepExecutionImpl.run(SCMStep.java:93)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStepStepExecutionImpl.run(SCMStep.java:80)atorg.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambdaStepExecutionImpl.run(SCMStep.java:80) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambdaStepExecutionImpl.run(SCMStep.java:80)atorg.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambdastart0(SynchronousNonBlockingStepExecution.java:47)atjava.util.concurrent.Executors0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors0(SynchronousNonBlockingStepExecution.java:47)atjava.util.concurrent.ExecutorsRunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: hudson.plugins.git.GitException: Error performing git command: git init /root/.jenkins/workspace/k8s-web-demo
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2436)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2359)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2355)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1915)
at org.jenkinsci.plugins.gitclient.CliGitAPIImplKaTeX parse error: Expected 'EOF', got '没' at position 170: …mo"): error=2, 没̲有那个文件或目录 at ja…LocalProc.(Proc.java:252)
at hudson.ProcLocalProc.<init>(Proc.java:221)athudson.LauncherLocalProc.<init>(Proc.java:221) at hudson.LauncherLocalProc.<init>(Proc.java:221)athudson.LauncherLocalLauncher.launch(Launcher.java:936)
at hudson.Launcher$ProcStarter.start(Launcher.java:454)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2422)
… 16 more
Caused by: java.io.IOException: error=2, 没有那个文件或目录
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
… 21 more
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Error cloning remote repo 'origin’
Finished: FAILURE

写回答

1回答

刘果国

2020-02-25

jenkins执行git失败,简单的问题是很好的学习机会,建议自己搞定哈

0
0

Kubernetes生产落地全程实践

一个互联网公司落地Kubernetes全过程点点滴滴

2293 学习 · 2211 问题

查看课程