簡體   English   中英

Jenkins 無法從公共存儲庫中提取 git 中的代碼

[英]Jenkins is not able to pull the code from git from a public repository

嗨,我對 jenkins 完全陌生,通過谷歌搜索一些我如何在 git 中添加 webhook 並且它的工作方式就像我提交它觸發工作時一樣完美,但在控制台中我看到 ZBA9F11ECC3497D9993B933FDC2BD 代碼和 1EZ 未獲取錯誤消息,如果有人能為我解決這個問題,將會很有幫助..

錯誤信息

Cloning the remote Git repository
Cloning repository https://github.com/zulfikarayub/Fravega_FrontEnd.git
 > git.exe init C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\Fravega_frontEnd # timeout=10
Fetching upstream changes from https://github.com/zulfikarayub/Fravega_FrontEnd.git
 > git.exe --version # timeout=10
 > git --version # 'git version 2.27.0.windows.1'
 > git.exe fetch --tags --force --progress -- https://github.com/zulfikarayub/Fravega_FrontEnd.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git.exe config remote.origin.url https://github.com/zulfikarayub/Fravega_FrontEnd.git # timeout=10
 > git.exe config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
 > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
Checking out Revision 8ff5713a5e01dcbb366787c20d24df417a404398 (refs/remotes/origin/master)
 > git.exe config core.sparsecheckout # timeout=10
 > git.exe checkout -f 8ff5713a5e01dcbb366787c20d24df417a404398 # timeout=10
ERROR: Unable to retrieve commit message
org.eclipse.jgit.errors.MissingObjectException: Missing unknown 8ff5713a5e01dcbb366787c20d24df417a404398
    at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:135)
    at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:203)
    at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:917)
    at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:827)
    at hudson.plugins.git.util.RevCommitRepositoryCallback.invoke(RevCommitRepositoryCallback.java:25)
    at hudson.plugins.git.util.RevCommitRepositoryCallback.invoke(RevCommitRepositoryCallback.java:13)
    at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(AbstractGitAPIImpl.java:29)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(CliGitAPIImpl.java:84)
    at hudson.plugins.git.GitSCM.printCommitMessageToLog(GitSCM.java:1386)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1355)
    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)
 > git.exe rev-list --no-walk 315e98c5f65da818e7a443082dba221ec90db8fd # timeout=10
Finished: SUCCESS

在此處輸入圖像描述

git插件可能有問題,降級你的插件試試看,

https://issues.jenkins.io/browse/JENKINS-46628

與 git 插件 v3.5.1 中看到的相同問題

我還在 git 插件 v4.3.0 中嘗試了您的存儲庫,效果很好。

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM