CI job creating folders and script fails with error could not lock config file

Hello Guys,

I have created a pipeline in Gitlab for master branch with a yaml file which simply invokes a powershell file to execute few commands. The problem is that the script fails with the below error

Also the path D:\Gitlab\builds\7d8e96ba\0\service\esb\iib\cicdpoc.tmp\git-template is empty and is getting created on its own when the job runs. I tried to place the powershell file in C folder and invoked the job but the result is could not lock config file in D.

I tried to git init and configured remote on child folder in Dand rerun the job but no luck and failed with the same error. What am I missing here. Any poiners please…

System OS - Windows 7