hudson.plugins.git.GitException: error code 128

I am having issues with a pipeline that clones repo to workspace to run security scans. Have created Jenkinsfile that clones multi repo to workspace then kick off batfile that will initiate scan. Job worked for months but not working currently after move to 2.444 I am getting the following message as soon as the job kicks off.

This issue is on a pipeline project. Now all my freestyle jobs work using same credentials. I am on Jenkins 2.444, Git 5.0.0, git client 4.1.0.
This is on Windows Server2016 installed with installer

Any help would be appreciated.

Jenkins setup:
Jenkins: 2.444
OS: Windows Server 2016 - 10.0
Java: 11.0.22 - Oracle Corporation (Java HotSpot(TM) 64-Bit Server VM)
---
ace-editor:1.1
ant:481.v7b_09e538fcca
antisamy-markup-formatter:162.v0e6ec0fcfcf6
apache-httpcomponents-client-4-api:4.5.14-150.v7a_b_9d17134a_5
authentication-tokens:1.4
authorize-project:1.4.0
bootstrap4-api:4.6.0-5
bootstrap5-api:5.3.2-3
bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9
branch-api:2.1071.v1a_188a_562481
caffeine-api:3.1.8-133.v17b_1ff2e0599
checks-api:2.0.2
cloudbees-folder:6.921.vfb_b_224371fb_4
command-launcher:107.v773860566e2e
commons-lang3-api:3.13.0-62.v7d18e55f51e2
commons-text-api:1.11.0-95.v22a_d30ee5d36
config-file-provider:3.11.1
configuration-as-code:1775.v810dc950b_514
credentials:1319.v7eb_51b_3a_c97b_
credentials-binding:523.vd859a_4b_122e6
cvs:2.19.1
display-url-api:2.200.vb_9327d658781
docker-commons:1.21
docker-workflow:521.v1a_a_dd2073b_2e
durable-task:500.v8927d9fd99d8
echarts-api:5.4.3-2
elasticsearch-query:1.2
email-ext:2.91
extended-read-permission:3.2
external-monitor-job:203.v683c09d993b_9
font-awesome-api:6.5.1-2
fortify:22.1.38
git:5.0.0
git-client:4.1.0
git-server:99.va_0826a_b_cdfa_d
github:1.35.0
github-api:1.303-400.v35c2d8258028
github-branch-source:1695.v88de84e9f6b_9
gitlab-api:5.0.1-78.v47a_45b_9f78b_7
gitlab-oauth:1.16
gitlab-plugin:1.7.6
gradle:1.40
groovy:442.v817e6d937d6c
handlebars:3.0.8
instance-identity:185.v303dc7c645f9
ionicons-api:56.v1b_1c8c49374e
ivy:2.2
ivytrigger:0.35
jackson2-api:2.15.2-350.v0c2f3f8fc595
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javadoc:226.v71211feb_e7e9
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.9-1
jdk-tool:73.vddf737284550
jersey2-api:2.38-1
jjwt-api:0.11.5-77.v646c772fddb_0
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.7.1-1
jsch:0.1.55.61.va_e9ee26616e7
json-api:20240205-27.va_007549e895c
junit:1259.v65ffcef24a_88
ldap:2.12
lockable-resources:2.16
mailer:463.vedf8358e006b_
mapdb-api:1.0.9-28.vf251ce40855d
matrix-auth:3.2.1
matrix-combinations-parameter:1.3.1
matrix-project:822.824.v14451b_c0fd42
maven-plugin:3.19
mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_
mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_
momentjs:1.1.1
msbuild:1.30
okhttp-api:4.9.3-108.v0feda04578cf
pam-auth:1.10
pipeline-build-step:2.18
pipeline-github-lib:38.v445716ea_edda_
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-groovy-lib:629.vb_5627b_ee2104
pipeline-input-step:466.v6d0a_5df34f81
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2114.v2654ca_721309
pipeline-model-definition:2.2114.v2654ca_721309
pipeline-model-extensions:2.2114.v2654ca_721309
pipeline-rest-api:2.31
pipeline-stage-step:296.v5f6908f017a_5
pipeline-stage-tags-metadata:2.2114.v2654ca_721309
pipeline-stage-view:2.31
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.8.0
popper-api:1.16.1-3
popper2-api:2.11.6-1
powershell:1.7
prism-api:1.29.0-10
resource-disposer:0.20
role-strategy:562.v44e9a_e828d0e
scm-api:683.vb_16722fb_b_80b_
script-security:1294.v99333c047434
sitemonitor:0.6
slack:625.va_eeb_b_168ffb_0
snakeyaml-api:2.2-111.vc6598e30cc65
ssh-credentials:305.v8f4381501156
ssh-slaves:2.846.v1b_70190624f5
sshd:3.312.v1c601b_c83b_0e
structs:325.vcb_307d2a_2782
subversion:2.16.0
teamconcert:2.4.1
teamconcert-git:2.0.3
token-macro:321.vd7cc1f2a_52c8
translation:1.16
trilead-api:2.84.v72119de229b_7
variant:59.vf075fe829ccb
windows-slaves:1.8.1
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1283.v99c10937efcb_
workflow-basic-steps:994.vd57e3ca_46d24
workflow-cps:3618.v13db_a_21f0fcf
workflow-cps-global-lib:609.vd95673f149b_b
workflow-durable-task-step:1199.v02b_9244f8064
workflow-job:1268.v6eb_e2ee1a_85a
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:865.v43e78cc44e0d
ws-cleanup:0.43

The “not in a git directory” message usually means that there was an earlier message in the log that describes why the initialization of the git repository in the agent workspace failed. That might have been caused by an upgrade of the command line git version on the same computer. It might be some other reason. The earlier messages in the console log will probably indicate the cause of the problem.

Plugin upgrades needed

Git client plugin 4.1.0 was released about a year ago. There have been several useful improvements in more recent releases of the plugin, including new versions of JGit, bug fixes, and more. There are about 20x more installations of recent git client plugin versions than there are installations running git client plugin 4.1.0. You’ll benefit by upgrading to git client plugin 4.1.0 after you resolve this more immediate issue.

Git plugin 5.0.0 was released about a year ago. There have been several important fixes in more recent releases. You should upgrade to the most recent git plugin release since it includes changes that are needed for correct operation with recent Jenkins releases. There are over 100 000 installations of git plugin 5.2.1 and only 13 000 installations of git plugin 5.0.0. You’ll benefit by upgrading to git plugin 5.2.1 after you have found the solution to this issue.