jenkins not uploading files from git to Workspace

I did spend an hour to find solution for my issue but I was not able to. I’m using Jenkins to make some tests and in future deploy my project to AWS.

Right now my configuration in Jenkins for git looks fine. I have link to my github repo. But When I’m using “Build now” and actually succesfully building job, but when i’m checking logs it showing me this:

Started by user unknown or anonymous
Running as SYSTEM
Building in workspace C:Windowssystem32configsystemprofileAppDataLocalJenkins.jenkinsworkspacetest_git
The recommended git tool is: NONE
using credential MyGit
Cloning the remote Git repository
Cloning repository
 > git.exe init C:Windowssystem32configsystemprofileAppDataLocalJenkins.jenkinsworkspacetest_git # timeout=10
Fetching upstream changes from
 > git.exe --version # timeout=10
 > git --version # 'git version'
using GIT_ASKPASS to set credentials 
 > git.exe fetch --tags --force --progress -- +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git.exe config remote.origin.url # 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/main^{commit}" # timeout=10
Checking out Revision bb6a87a950e251b83d44296b0d230317ec43056c (refs/remotes/origin/main)
 > git.exe config core.sparsecheckout # timeout=10
 > git.exe checkout -f bb6a87a950e251b83d44296b0d230317ec43056c # timeout=10
ERROR: Unable to retrieve commit message
org.eclipse.jgit.errors.MissingObjectException: Missing unknown bb6a87a950e251b83d44296b0d230317ec43056c
    at org.eclipse.jgit.revwalk.RevWalk.parseAny(
    at org.eclipse.jgit.revwalk.RevWalk.parseCommit(
    at hudson.plugins.git.util.RevCommitRepositoryCallback.invoke(
    at hudson.plugins.git.util.RevCommitRepositoryCallback.invoke(
    at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(
    at hudson.plugins.git.GitSCM.printCommitMessageToLog(
    at hudson.plugins.git.GitSCM.checkout(
    at hudson.scm.SCM.checkout(
    at hudson.model.AbstractProject.checkout(
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(
    at jenkins.scm.SCMCheckoutStrategy.checkout(
    at hudson.model.AbstractBuild$
    at hudson.model.Run.execute(
    at hudson.model.ResourceController.execute(
 > git.exe rev-list --no-walk bb6a87a950e251b83d44296b0d230317ec43056c # timeout=10
[test_git] $ cmd.exe /c call C:WindowsTEMPshiningpanda2252295568321242739.bat

C:Windowssystem32configsystemprofileAppDataLocalJenkins.jenkinsworkspacetest_git>python --version  
Python 3.9.7

C:Windowssystem32configsystemprofileAppDataLocalJenkins.jenkinsworkspacetest_git>exit 0 
Finished: SUCCESS

I have this error “ERROR: Unable to retrieve commit message” and I don’t have any files in Workspace.

I did try to reinstall jenkins, I did try to push fresh Commit to github but still same error.

Any ideas how to solve it?

Please be specific and if you will decide to give me link to another Stackoverflow questions MAKE SURE it will be SAME question.

Thank you, Sergey


I found solution. The issue was with root folders for Jenkins. And also I’m suspecting that some projects in Jenkins were not working properly after I reinstall Jenkins. So what I did is Remove ALL Jenkins files from PC and reinstall it from scratch:

how to remove completly from PC:

Open Windows Control Panel and click Programs and Features
Right-click Jenkins (where, is the Jenkins version), and select Uninstall.
Follow the directions.
When done, delete the following folders: (note: DO NOT remove the jenkins.jenkins or jenkinswar folders if you want to keep the projects and plugins.)

C:Program FilesJenkins or C:Program Files(x86)Jenkins 

Restart the computer.

After that I did recreate my projects in Jenkins and everything working great now.