Windows環(huán)境中的jenkins構(gòu)建時(shí)報(bào)錯(cuò)
按照第三章的講解進(jìn)行安裝配置后,最后嘗試連接進(jìn)行驗(yàn)證時(shí),可以走通。但是到第五章實(shí)際實(shí)現(xiàn)自動(dòng)化部署任務(wù)時(shí),按照課程的講解配置完后,構(gòu)建時(shí)報(bào)錯(cuò):
Started?by?user?adminRunning?as?SYSTEM [EnvInject]?-?Loading?node?environment?variables. Building?remotely?on?TestEnv?in?workspace?/root/.jenkins/workspace/DeployOder ?>?/usr/bin/git?rev-parse?--is-inside-work-tree?#?timeout=10 Fetching?changes?from?the?remote?Git?repository ?>?/usr/bin/git?config?remote.origin.url?git@github.com:mengcan624/order.git?#?timeout=10 Fetching?upstream?changes?from?git@github.com:mengcan624/order.git ?>?/usr/bin/git?--version?#?timeout=10 ?>?/usr/bin/git?fetch?--tags?--progress?git@github.com:mengcan624/order.git?+refs/heads/*:refs/remotes/origin/*?#?timeout=10 ERROR:?Error?fetching?remote?repo?'origin' hudson.plugins.git.GitException:?Failed?to?fetch?from?git@github.com:mengcan624/order.git at?hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888) at?hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155) at?hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186) at?hudson.scm.SCM.checkout(SCM.java:505) at?hudson.model.AbstractProject.checkout(AbstractProject.java:1205) at?hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574) at?jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at?hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at?hudson.model.Run.execute(Run.java:1853) at?hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at?hudson.model.ResourceController.execute(ResourceController.java:97) at?hudson.model.Executor.run(Executor.java:427) Caused?by:?hudson.plugins.git.GitException:?Command?"/usr/bin/git?fetch?--tags?--progress?git@github.com:mengcan624/order.git?+refs/heads/*:refs/remotes/origin/*"?returned?status?code?128: stdout:? stderr:?Host?key?verification?failed. fatal:?The?remote?end?hung?up?unexpectedly at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2430) at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2044) at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:81) at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:569) at?org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161) at?org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:154) at?hudson.remoting.UserRequest.perform(UserRequest.java:211) at?hudson.remoting.UserRequest.perform(UserRequest.java:54) at?hudson.remoting.Request$2.run(Request.java:369) at?hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 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) Suppressed:?hudson.remoting.Channel$CallSiteStackTrace:?Remote?call?to?TestEnv at?hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741) at?hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) at?hudson.remoting.Channel.call(Channel.java:955) at?org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146) at?sun.reflect.NativeMethodAccessorImpl.invoke0(Native?Method) at?sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at?sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at?java.lang.reflect.Method.invoke(Method.java:498) at?org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132) at?com.sun.proxy.$Proxy159.execute(Unknown?Source) at?hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886) at?hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155) at?hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186) at?hudson.scm.SCM.checkout(SCM.java:505) at?hudson.model.AbstractProject.checkout(AbstractProject.java:1205) at?hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574) at?jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at?hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at?hudson.model.Run.execute(Run.java:1853) at?hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at?hudson.model.ResourceController.execute(ResourceController.java:97) at?hudson.model.Executor.run(Executor.java:427) ERROR:?Error?fetching?remote?repo?'origin' Finished:?FAILURE
本人jenkins是安裝部署到windows環(huán)境的,訪問(wèn)虛擬機(jī)中的Linux環(huán)境,虛擬機(jī)中的git以及本地中的Git的公鑰也都配置在了github上,還是報(bào)錯(cuò),求解~~~急~~~~~~
2020-10-12
參考https://blog.csdn.net/weixin_40816738/article/details/90280863
大概就是配置Node的git的工具位置
2020-04-16
我也碰到了,感覺(jué)這是個(gè)大坑。。。。。不知道老師為什么可以不配,可能是蘋果電腦的原因吧,可能目錄一樣?