# Jenkins is no more works with reference git repository

**URL:** <https://community.jenkins.io/t/jenkins-is-no-more-works-with-reference-git-repository/5832>\
**Category:** Ask a question\
**Created:** [February 17, 2023, 5:13am UTC](https://community.jenkins.io/t/jenkins-is-no-more-works-with-reference-git-repository/5832 "2023-02-17T05:13:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jy\_jenkins](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jy\_jenkins](https://community.jenkins.io/u/jy_jenkins)\
**Post date:** [February 17, 2023, 5:13am UTC](https://community.jenkins.io/t/jenkins-is-no-more-works-with-reference-git-repository/5832/1 "2023-02-17T05:13:31Z")

</div>

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:

1. Added git plugin
2. Provided repository url and credential in the configure page of Jenkins
3. Selected, ‘Advanced clone behaviours’ from ‘advanced Behaviors’
4. Provided path where the bare git repository located. (bare repo created by cloning gerrit with --mirror option)
5. Triggered the build

Note : Tried deleting the job from /var/lib/jenkins/workspace, but still using remote repo for cloning.

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [February 23, 2023, 8:40am UTC](https://community.jenkins.io/t/jenkins-is-no-more-works-with-reference-git-repository/5832/2 "2023-02-23T08:40:49Z")

</div>

Hello @jy_jenkins and welcome to this community 👋

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?

Thanks.

---

<div class="post-metadata">

**Author:** ![jy\_jenkins](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jy\_jenkins](https://community.jenkins.io/u/jy_jenkins)\
**Post date:** [February 27, 2023, 9:06am UTC](https://community.jenkins.io/t/jenkins-is-no-more-works-with-reference-git-repository/5832/3 "2023-02-27T09:06:02Z")

</div>

Hi Bruno Verachten,

Thank you for your reply.  
I have added the requested details below,

What is the version of Jenkins you’re running?  
2.375.2

On which OS?  
Red Hat Enterprise Linux Server 7.9 (Maipo)

With which version of Java? From which vendor?  
openjdk version “11.0.17” 2022-10-18 LTS, java.vm.vendor = Red Hat, Inc.

What is the git plugin version you’re using?  
Git plugin  
Version5.0.0

---

<div class="post-metadata">

**Author:** ![kon](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/kon/32/1197_2.png) [@kon](https://community.jenkins.io/u/kon)\
**Post date:** [February 28, 2023, 6:15pm UTC](https://community.jenkins.io/t/jenkins-is-no-more-works-with-reference-git-repository/5832/4 "2023-02-28T18:15:31Z")

</div>

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](https://git-scm.com/docs/git-config#Documentation/git-config.txt-safedirectory).
