简体   繁体   中英

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

Hi i am completely new to jenkins, by googling some how i have add webhook in git and its working perfectly like when ever i do commit it triggers a job, but in console i am seeing git not bale to fetch the code and throwing an error message,will be helpfull if anyone will sort out this for me..

Error message

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

enter image description here

It might be issue with git plug-in, downgrade your plug-in and give a try,

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

as same issue seen in git plug-in v3.5.1

I have also tried your repository in v4.3.0 of git plug-in which is worked fine.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM