当前位置:   article > 正文

# 2021-01-07 #「Git」- git rev-parse returned status code 128_stderr: fatal: ambiguous argument 'dev': unknown r

stderr: fatal: ambiguous argument 'dev': unknown revision or path not in the

问题描述

Jenkins 中,当构建开始后发生如下错误:

 > git rev-parse remotes/origin/test^{commit} # timeout=10
hudson.plugins.git.GitException: Command "git rev-parse remotes/origin/test^{commit}" returned status code 128:
stdout: remotes/origin/test^{commit}

stderr: fatal: ambiguous argument 'remotes/origin/test^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2010)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2006)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1638)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1650)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:835)
	at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
	at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:98)
	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1076)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1193)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.util.concurrent.Executors$RunnableAdapter.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)
Finished: FAILURE

问题原因

该问题成因与 Could not resolve refs tags 类似,都是由于”在命令行中所指定的 TAG 不存在“而导致的。

而不存在该 TAG 的原因是构建过程的错误操作,导致 Workspace 发生损坏。

解决办法

自己的锅,能怎么办………………

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

闽ICP备14008679号