1
votes

I created a Jenkinsfile and put it on Git repo. I have Linux VM that has this pipeline that config with a script from SCM and working find. I created a Windows VM with Jenkins also and create the same pipeline again with the same configuration (with light checkout) and got a plugin error. After unmark the light checkout the git finds the repo but on the git checkout -f part error throw.

Error: ERROR: Unable to retrieve commit message

after the error the git try to run git rev-list --no-walk on the directory path of the job (C:/..//.Jenkinsfile) and get the error not found(I checked and the file exist ).

1
can you add your Jenkinsfile in the question? - Hussain K

1 Answers

0
votes

I found I was getting this issue on Windows 10 when the job runs on the "master" node. Setting up a new Jenkins node, starting the JNLP Java app, then specifying the "agent", using a label in the pipeline was my "workaround".

(Edit: Though be great to dig deeper and understand why it's failing (assume some Windows Access permissions of git) as I'm now hitting this error when trying to use a Shared Library. The git checkout is failing to "read the commit message" however it does actually clone the branch, but fails to find the vars/src directories.)

There is an issue with the Shared Library, and it running as the Local System, despite running a manual library step on my "agent". I followed steps to setup SSH for the local system, still no luck. In the end, I setup a new Linux Mint system, to be the Jenkins Master, then use Windows agents for the clone/build and all works a treat!

TL;DR Shared Libraries on Windows is tricky, use a Linux Jenkins Master as a workaround!