当前位置:   article > 正文

hudson.plugins.git.GitException_hudson.plugins.git.gitexception: command "git fetc

hudson.plugins.git.gitexception: command "git fetch --tags --force --progres

使用jenkins构建工程时报错

[EnvInject] - Loading node environment variables.
Building in workspace /data/jenkins/workspace/project-name
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url ssh://git@gitlab.xx.domain:10022/project/project-name.git # timeout=10
Fetching upstream changes from ssh://git@gitlab.xx.domain:10022/project/project-name.git
 > git --version # timeout=10
using GIT_SSH to set credentials deploy-key
 > git fetch --tags --progress ssh://git@gitlab.xx.domain:10022/project/project-name.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from ssh://git@gitlab.xx.domain:10022/project/project-name.git
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:825)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1092)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1123)
	at hudson.scm.SCM.checkout(SCM.java:495)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1202)
	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:1727)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@gitlab.xx.domain:10022/project/project-name.git +refs/heads/*:refs/remotes/origin/*" returned status code 1:
stdout: 
stderr: error: there are still refs under 'refs/remotes/origin/dev'
From ssh://gitlab.xx.domain:10022/project/project-name
 ! [new branch]      dev        -> origin/dev  (unable to update local ref)
   4f5b2e5..969713f  master     -> origin/master
   4f5b2e5..969713f  test       -> origin/test

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1970)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1689)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:380)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:823)
	... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE

删除/data/jenkins/workspace/project-name后重新构建

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

闽ICP备14008679号