Jenkins is no more works with reference git repository. Reference repository is introduced to reduced direct connection to the remote Git server (in our case, Gerrit), However Jenkins still fetching the data from the remote repository post setting up remote repository config.
Steps done:
Added git plugin
Provided repository url and credential in the configure page of Jenkins
Selected, ‘Advanced clone behaviours’ from ‘advanced Behaviors’
Provided path where the bare git repository located. (bare repo created by cloning gerrit with --mirror option)
Triggered the build
Note : Tried deleting the job from /var/lib/jenkins/workspace, but still using remote repo for cloning.
What is the version of Jenkins you’re running?
On which OS?
With which version of Java? From which vendor?
What is the git plugin version you’re using?
Could possibly be caused by the CVE-2022-24765 fix in Git 2.30.3, if Jenkins runs as a user different from the owner of the repository. See safe.directory.