On Jenkins I get an error
Checking out Revision 028951e3660cfba709acb85d4620ce071f89451b (origin/JenkinsTest)
Enabling Git LFS pull
> git.exe config core.sparsecheckout # timeout=10
> git.exe checkout -f 028951e3660cfba709acb85d4620ce071f89451b
FATAL: Could not checkout 028951e3660cfba709acb85d4620ce071f89451b
hudson.plugins.git.GitException: Command "git.exe checkout -f 028951e3660cfba709acb85d4620ce071f89451b" returned status code 128:
stdout:
stderr: fatal: reference is not a tree: 028951e3660cfba709acb85d4620ce071f89451b
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1990)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$800(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2289)
Caused: hudson.plugins.git.GitException: Could not checkout 028951e3660cfba709acb85d4620ce071f89451b
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2313)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1210)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1202)
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:1724)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
Sending e-mails to: xxxxxxxxxxxxxxxxx
Finished: FAILURE
The Problem is the following:
We use our own Gitlab-Server and the repository is importet from github.
For testing I created the branch "origin/jenkinsTest" which is refered in the error on Gitlab.
After testing I deleted the repository on gitlab and importet as newly from github. Now ofcourse there is no branch "origin/jenkinsTest" anymore.
I already removed the workspace on Jenkins for this repository but it keeps failing with this error.
How can I fix this?
On another PC I can clone the repository from Gitlab perfectly, so it can not be a failure on the Gitlab-Server but has to be on the Jenkins-Server (Windows 10).
EDIT
Running git branch -r
on another clone as suggested in the comments gave me
origin/BugFixing
origin/CoroutinesDisableButtons
origin/GestureRotation
origin/MovePanelsOnMove
origin/NewNetworking
origin/RebuildUIWithPrefabs
origin/ShowSimpleModelsOnly
origin/SourceLostBug
origin/States_Management
origin/SwitchToplayers
origin/UI-Panels
origin/UIFeinschliff
origin/master
And actually just before the error from above I also see it like this in the Jenkins output:
Seen branch in repository origin/BugFixing
Seen branch in repository origin/CoroutinesDisableButtons
Seen branch in repository origin/GestureRotation
Seen branch in repository origin/MovePanelsOnMove
Seen branch in repository origin/NewNetworking
Seen branch in repository origin/RebuildUIWithPrefabs
Seen branch in repository origin/ShowSimpleModelsOnly
Seen branch in repository origin/SourceLostBug
Seen branch in repository origin/States_Management
Seen branch in repository origin/SwitchToplayers
Seen branch in repository origin/UI-Panels
Seen branch in repository origin/UIFeinschliff
Seen branch in repository origin/master
seen 13 remote branches
> git.exe show-ref --tags -d # timeout=10
EDIT 2
I create and configured a New Job with different Name and this one clone/checkout/pull the git just fine while using the original Job it still fails. (I'm letting Jenkins clean the workspace before build and also deletet the complete workspace folder manually).
Is there maybe any data about the Job/Git stored outside the workspace folder?!