# Can't connect to git repo

**URL:** https://community.jenkins.io/t/cant-connect-to-git-repo/14640
**Category:** Ask a question
**Created:** [April 28, 2024, 12:39pm UTC](https://community.jenkins.io/t/cant-connect-to-git-repo/14640 "2024-04-28T12:39:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RehamTammam1](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/rehamtammam1/32/8010_2.png) [@RehamTammam1](https://community.jenkins.io/u/RehamTammam1)
#### Post date: [April 28, 2024, 12:39pm UTC](https://community.jenkins.io/t/cant-connect-to-git-repo/14640/1 "2024-04-28T12:39:19Z")

</div>

Hello please I’m trying to comment jenkis to a public repository and each time I git this error **Failed to connect to repository : Error performing git command: git.exe ls-remote**

---

<div class="post-metadata">

### Author: ![RehamTammam1](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/rehamtammam1/32/8010_2.png) [@RehamTammam1](https://community.jenkins.io/u/RehamTammam1)
#### Post date: [April 28, 2024, 12:51pm UTC](https://community.jenkins.io/t/cant-connect-to-git-repo/14640/2 "2024-04-28T12:51:16Z")

</div>

Problem Solved using the following steps  
1- Make sure git is installed on your Machine  
for Windows check c-\>Program Files → Git → bin → git.exe  
otherwise download it  
2- Provide a location to git.exe to Jenkins  
Mange Jenkins → Tools → Git installations → Path to Git executable  
in Path to Git executable add the path of your local computer to git.ext  
ex:C:\Program Files\Git\bin

[![](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/6/65d3a220f89a5843cc21280612ac640711ef064c.jpeg "Jenkins How to solve Failed to connect to repository") ](https://www.youtube.com/watch?v=F5QKON50xP8)
