当前位置:   article > 正文

Jenkins构建时报错 hudson.plugins.git.GitException: Failed to fetch from ssh://git@gitlab.lucy.com

hudson.plugins.git.gitexception: failed to fetch from

                      --昨夜西风凋碧树,独上高楼,望尽天涯路

Jenkins + GitLab持续集成时遇到如下错误:

  1. ERROR: Error fetching remote repo 'origin'
  2. hudson.plugins.git.GitException: Failed to fetch from ssh://git@gitlab.lucy.com:2222/lucy/test.git
  3. at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
  4. at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
  5. at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
  6. at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
  7. at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
  8. at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
  9. at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
  10. at hudson.security.ACL.impersonate(ACL.java:290)
  11. at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
  12. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  13. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  14. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  15. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  16. at java.lang.Thread.run(Thread.java:748)
  17. Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@gitlab.lucy.com:2222/lucy/test.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
  18. stdout:
  19. stderr: Host key verification failed.
  20. fatal: Could not read from remote repository.
  21. Please make sure you have the correct access rights
  22. and the repository exists.
  23. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)
  24. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1735)
  25. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
  26. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:420)
  27. at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
  28. ... 13 more

解决方案:

删除Jenkins workspace下的工程后重新构建

Jenkins workspace可以再构建的log中查看:

 重新构建之后:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/562513
推荐阅读
相关标签
  

闽ICP备14008679号