jenkins - Jenkins Ghprb 构建失败:错误:克隆远程 repo 'origin' 时出错
问题描述
我遇到的问题仅针对某个人分支的特定 PR。其他构建均已成功启动并顺利完成。
我可以通过在打开 PR 中发表评论来触发构建,除了这个特定的一个......
在下面登录
GitHub pull request #712 of commit 6ed63bc4f991b2209f8088c1ce18b075251d8532, no merge conflicts.
Running as SYSTEM
Setting status of 6ed63bc4f991b2209f8088c1ce18b075251d8532 to PENDING with url http://<jenkins server>:8080/job/<project name>/917/ and message: 'Build started for merge commit.'
Using context: <check message>
Building in workspace /nobackup/jenkins/workspace/<project_name>
The recommended git tool is: NONE
using credential <credential>
Cloning the remote Git repository
Cloning repository https://wwwin-github.cisco.com/xcare/chaos.git
Cloning the remote Git repository
Cloning repository https://wwwin-github.<company name>.com/<repo> /usr/bin/git init /nobackup/jenkins/workspace/<project_name> # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /nobackup/jenkins/workspace/<project_name>
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:997)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:752)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1219)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1297)
at hudson.scm.SCM.checkout(SCM.java:505)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
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:1894)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
Caused by: hudson.plugins.git.GitException: Error performing git command: /usr/bin/git init /nobackup/jenkins/workspace/PR_Check
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2457)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2380)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2376)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1923)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:995)
... 12 more
Caused by: java.io.IOException: Cannot run program "/usr/bin/git" (in directory "/nobackup/jenkins/workspace/<project_name>"): error=7, Argument list too long
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:252)
at hudson.Proc$LocalProc.<init>(Proc.java:221)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)
at hudson.Launcher$ProcStarter.start(Launcher.java:508)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2443)
... 16 more
Caused by: java.io.IOException: error=7, Argument list too long
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 21 more
ERROR: Error cloning remote repo 'origin'
解决方案
哦,刚刚发现了问题……我希望我的同事和他/她的家人有一个美好的圣诞节和新年快乐。根本原因是https://issues.jenkins-ci.org/browse/JENKINS-38576
我的同事在他的评论中留下了一个疯狂的长描述......
猜猜自从网络或 github 诞生以来,互联网上没有人做过这种事情......
推荐阅读
- azure - Azure 函数运行时异常,系统数据 sqlclient 异常的类型初始化程序,无法加载 DLL 'sni.dll'
- r - RStudio 无法安装“igraph” - C 编译器无法创建可执行文件
- java - 添加 `@SpringBootTest` 注释会触发 IntelliJ 误报
- git - 离开 git 分支的最佳实践
- r - ldply 从系数(模型)中提取标准偏差
- python - 在 Dataproc 的集群中查找 Hadoop 流 jar
- python - 使用双向而不是标准 LSTM 层时的形状错误
- python - 如何使用 lxml 插入具有正确命名空间前缀的属性
- windows - 如何确定 Media Foundation 中特定 MJPEG 子类型的色度子采样?
- visual-studio-code - VS Code - 键绑定 - 我自己的块注释