# GIT plugin in jenkins not able to connect to GIT repository

**URL:** https://community.jenkins.io/t/git-plugin-in-jenkins-not-able-to-connect-to-git-repository/8680
**Category:** Ask a question
**Created:** [July 25, 2023, 11:16pm UTC](https://community.jenkins.io/t/git-plugin-in-jenkins-not-able-to-connect-to-git-repository/8680 "2023-07-25T23:16:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hollychen](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@hollychen](https://community.jenkins.io/u/hollychen)
#### Post date: [July 25, 2023, 11:16pm UTC](https://community.jenkins.io/t/git-plugin-in-jenkins-not-able-to-connect-to-git-repository/8680/1 "2023-07-25T23:16:37Z")

</div>

got error: Failed to connect to repository : Error performing git command: git ls-remote -h [git@mcdasatest07.isd.lacounty.gov](mailto:git@mcdasatest07.isd.lacounty.gov):jenkins/ampsoaapplication.git HEAD  
when connecting GitLab from Jenkins.

- Holly

---

<div class="post-metadata">

### Author: ![benipeled](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/benipeled/32/1598_2.png) [@benipeled](https://community.jenkins.io/u/benipeled)
#### Post date: [July 26, 2023, 12:58pm UTC](https://community.jenkins.io/t/git-plugin-in-jenkins-not-able-to-connect-to-git-repository/8680/2 "2023-07-26T12:58:15Z")

</div>

Double check the `mcdasatest07.isd.lacounty.gov` domain and if it’s the correct domain, make sure that Jenkins controller (and nodes) can resolve it,  
If it still doesn’t work as expected - make sure the `Credentials` set properly

---

<div class="post-metadata">

### Author: ![hollychen](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@hollychen](https://community.jenkins.io/u/hollychen)
#### Post date: [July 26, 2023, 11:30pm UTC](https://community.jenkins.io/t/git-plugin-in-jenkins-not-able-to-connect-to-git-repository/8680/3 "2023-07-26T23:30:15Z")

</div>

After install GIT 2.32.0, got error:  
Failed to connect to repository: Command “git ls-remote -h [git@mcdasatest07.isd.lacounty.gov](mailto:git@mcdasatest07.isd.lacounty.gov):jenkins/ampsoaapplication.git HEAD” returned status code 128:  
stdout:  
stderr: Host key verification failed.  
fatal: Could not read from remote repository.

Please make sure you have the correct access rights  
and the repository exists.

---

<div class="post-metadata">

### Author: ![hollychen](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@hollychen](https://community.jenkins.io/u/hollychen)
#### Post date: [July 26, 2023, 11:58pm UTC](https://community.jenkins.io/t/git-plugin-in-jenkins-not-able-to-connect-to-git-repository/8680/4 "2023-07-26T23:58:40Z")

</div>

When I manually run  
:/bin\>git ls-remote -h [git@mcdasatest07.isd.lacounty.gov](mailto:git@mcdasatest07.isd.lacounty.gov):jenkins/ampsoaapplication.git HEAD  
The authenticity of host ‘[mcdasatest07.isd.lacounty.gov](http://mcdasatest07.isd.lacounty.gov) (10.48.153.14)’ can’t be established.  
ECDSA key fingerprint is SHA256:PEfV8BksPEGyGiZ59mNbWnijAeKTCVNp1mHs1gff4fY.  
ECDSA key fingerprint is MD5:64:e0:e2:77:84:f1:80:af:b0:94:02:d1:78:d2:78:9c.  
Are you sure you want to continue connecting (yes/no)? yes  
Warning: Permanently added ‘[mcdasatest07.isd.lacounty.gov](http://mcdasatest07.isd.lacounty.gov),10.48.153.14’ (ECDSA) to the list of known hosts.  
[git@mcdasatest07.isd.lacounty.gov](mailto:git@mcdasatest07.isd.lacounty.gov)’s password:  
Permission denied, please try again.  
[git@mcdasatest07.isd.lacounty.gov](mailto:git@mcdasatest07.isd.lacounty.gov)’s password:  
Authentication failed.  
fatal: Could not read from remote repository.

What’s password for [git@mcdasatest07.isd.lacounty.gov](mailto:git@mcdasatest07.isd.lacounty.gov) supposed to be?
