Jenkins Blue Ocean在GitHub'git checkout -b branch-name'上失败,状态码为128:

时间:2019-03-14 22:32:44

标签: jenkins github jenkins-blueocean

根据YT教程Getting Started with Blue Ocean's Visual Pipeline Editor,在使用BO Visual Editor进行第二轮修改Jenkinsfile之后,我很难继续进行下去。

当我点击“保存并运行”按钮时,Jenkins BO管道开始运行,但是失败了:

GitHub has been notified of this commit’s build result  

hudson.plugins.git.GitException: Command "git checkout -b blue-ocean-editor 9c164f507fa831c33d44d83e1f458ec50b433f40" returned status code 128:

stdout: 

stderr: fatal: A branch named 'blue-ocean-editor' already exists

如果您查看我的存储库,并且the particular commit(s)詹金斯已经能够在我的最初提交(由新的BO管道引起)中创建“ blue-ocean-editor”分支,并且还可以推送下一个提交“展开我的Blue Ocean管道”,因此我怀疑我的詹金斯将没有像here所讨论的那样拥有正确的凭证。

但是有些超时。不知道这是多少关注。 无论如何,这是我的BO管道的完整输出:

Branch indexing

Connecting to https://api.github.com using zxxxy/****** (GitHub Access Token)

Obtained Jenkinsfile from 9c164f507fa831c33d44d83e1f458ec50b433f40

Running in Durability level: MAX_SURVIVABILITY

[Pipeline] Start of Pipeline

[Pipeline] node

Running on Jenkins in /var/lib/jenkins/jobs/HelloWorldProject/branches/blue-ocean-editor/workspace

[Pipeline] {

[Pipeline] stage

[Pipeline] { (Declarative: Checkout SCM)

[Pipeline] checkout

using credential github

 > git rev-parse --is-inside-work-tree # timeout=10

Fetching changes from the remote Git repository

 > git config remote.origin.url https://github.com/delphym/HelloWorldProject.git # timeout=10

Cleaning workspace

 > git rev-parse --verify HEAD # timeout=10

Resetting working tree

 > git reset --hard # timeout=10

 > git clean -fdx # timeout=10

Fetching without tags

Fetching upstream changes from https://github.com/delphym/HelloWorldProject.git

 > git --version # timeout=10

using GIT_ASKPASS to set credentials GitHub Access Token

 > git fetch --no-tags --progress https://github.com/delphym/HelloWorldProject.git +refs/heads/blue-ocean-editor:refs/remotes/origin/blue-ocean-editor # timeout=10

Checking out Revision 9c164f507fa831c33d44d83e1f458ec50b433f40 (blue-ocean-editor)

 > git config core.sparsecheckout # timeout=10

 > git checkout -f 9c164f507fa831c33d44d83e1f458ec50b433f40 # timeout=10

 > git branch -a -v --no-abbrev # timeout=10

 > git checkout -b blue-ocean-editor 9c164f507fa831c33d44d83e1f458ec50b433f40 # timeout=10

[Pipeline] }

[Pipeline] // stage

[Pipeline] }

[Pipeline] // node

[Pipeline] End of Pipeline

[BFA] Scanning build for known causes...

[BFA] No failure causes found

[BFA] Done. 0s



GitHub has been notified of this commit’s build result



hudson.plugins.git.GitException: Command "git checkout -b blue-ocean-editor 9c164f507fa831c33d44d83e1f458ec50b433f40" returned status code 128:

stdout: 

stderr: fatal: A branch named 'blue-ocean-editor' already exists.



    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2318)

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$900(CliGitAPIImpl.java:81)

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2627)

Caused: hudson.plugins.git.GitException: Could not checkout blue-ocean-editor with start point 9c164f507fa831c33d44d83e1f458ec50b433f40

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2649)

    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1228)

    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

我想知道我可能做错了什么。我相信我拥有许多最新的Jenkins以及所有的插件和OS,但简要地说: 操作系统:Ubuntu Trusty 14.04.6 LTS 詹金斯:詹金斯版。 2.161(有点落后,但是我想切换到稳定版本) 插件:Blue Ocean 1.13.2

0 个答案:

没有答案