问题描述

在 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 发生损坏。

解决办法

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

「Git」- git rev-parse returned status code 128 @20210317相关推荐

  1. Jenkins连接git时出现“Failed to connect to repository : Command ... HEAD“ returned status code 128:”的问题解决

    Jenkins连接git时出现"Failed to connect to repository : Command ... HEAD" returned status code 1 ...

  2. jenkins 源码管理 returned status code 128: stdout: stderr: fatal: unable to access “****” 403 解决办法

    在配置jenkins 源码管理 远程链接git时 提示 报错 Failed to connect to repository : Command"usr/bin/git ls-remote ...

  3. RabbitMQ在Docker中安装以及Management API returned status code 500错误

    docker安装rabbitMQ docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq --restart=always --hostna ...

  4. git did not exit cleanly (exit code 128)已解决

    git did not exit cleanly (exit code 128)的解决 解决方案一: 前期第一次弹出来的用户名和密码框内的填写错误,补救方法:修改成正确的用户名(不加@)和正确的密码( ...

  5. 「Githug」Git 游戏通关流程

    Githug 他喵的这是个啥!?难道不是 GitHub 拼错了么,和 Git 什么关系? 和游戏又有什么关系? 其实,他的元身在这里:https://github.com/Gazler/githug  ...

  6. git did not exit cleanly(exit code 128)报错的部分原因及解决方法

    今天用tortoisegit同步新的文件到github上的时候出现了git did not exit cleanly的报错,分析原因可能是网络出现问题或者是因为当时文件还处于打开状态就上传了. 对此, ...

  7. 「Git」常用工作流介绍

    作者:轩邈 简介 工作流本质上是项目的流程管理和开发的协同约定.本文旨在通过有效的项目流程管理和高效的开发协同约定,提升减少项目的错误率,提升项目的稳定性,最终提高开发效率. Git常用工作流介绍 一 ...

  8. 像git一样使用AI数据集!免费数据托管工具上线,让模型用「活」的数据集训练...

    贾浩楠 发自 凹非寺 量子位 报道 | 公众号 QbitAI 搞机器学习的人,很多都饱受数据管理的折磨. 要么是数据集老旧,需要手工修订标注. 要么是同一个数据集有很多被别人调整过的版本,无从下手. ...

  9. git 上传项目到linux仓库_「成都校区」Git使用快速入门

    Git使用快速入门 1.在Linux上安装Git 输入git命令,查询是否安装了git (1)如果是Debian或Ubuntu Linux系统,使用如下命令进行安装: apt-get install ...

最新文章

  1. 搜狗CEO王小川:AI领域存在泡沫 但留下的是珍珠
  2. 重游java(猜数和逛街)
  3. 子屏幕selection-screen
  4. kmean python实现
  5. spring 类型转换器_Spring中的类型转换
  6. jsencrypt加密同一值返回不同密文_密码学原语如何应用?解析密文同态性的妙用...
  7. zibll子比主题v5.4免授权修复版
  8. c语言string函数的用法_同一个函数的五六个版本,C++string insert函数详解
  9. Mr.J-- jQuery学习笔记(三十)--属性操作方法(添加删除)
  10. 【BZOJ】3922: Karin的弹幕
  11. efi引导文件_你们心心念念的oc通用EFI来了!
  12. [转]网络爬虫(一):抓取网页的含义和URL基本构成
  13. 【2021牛客暑期多校训练营5】Double Strings(二维字符串dp)
  14. Delphi、Lazarus保留字、关键字详解
  15. 【MySQL】mysql中any,in,some,all的区别
  16. 单片机关于protues中数码管的显示
  17. 软件系统的沙盘测试是什么东西,沙盘(一款安全软件)_百度百科
  18. python中关于self的理解
  19. python程序设计的选择题_智慧树Python程序设计基础选择题答案
  20. 数据分析实战项目2:优衣库销售数据分析

热门文章

  1. 教你隐藏盘符,把你的小姐姐藏起来
  2. Android @Override详解
  3. Python 动物 , 人,狗,猫 面向对象关系 代码
  4. 顺丰O2O背后的商业逻辑与焦虑
  5. PostgreSQL UPDATE 语句
  6. 海奥华预言--译文前言
  7. 访《VR开发实战》作者冀盼——VR 开发者的核心竞争力
  8. 爬虫软件在我们网站数据采集中起什么作用
  9. 要如何禁止键盘钩子?
  10. 税收微观数据07-16