Failed to connect to repository Error performing git command git ls-remote -h https github com jenikis hook git HEAD

+1 vote

Hi Guys,

I am trying to integrate jenkins with GitHub. I installed all the plugins but still I am getting this below error.

Failed to connect to repository : Error performing git command: git ls-remote -h https://github.com/jenikis_hook.git HEAD

How can I solve this error?

May 4, 2020 in Jenkins by akhtar
• 38,260 points
22,965 views

1 answer to this question.

0 votes

Hi@akhtar,

There may be several reasons behind this error. One the reason may be if you don't have git installed where you have jenkins server. To avoid this you can use the below given command.

$ yum install git

Another reason may be if you didn't configure the path of git in jenkins. To set git path you can follow the below steps.

  • Go to manage jenkins

  • From there click on Global tool configuration

  • There you can find git path option.

Hope this will solve your problem.

answered May 4, 2020 by MD
• 95,460 points
Thank You. This worked for me

This didn't work for me though GIT plugin is enabled in Jenkins.. anyway, which path to set in the Global Configuration for GIT. ??

Hi@Ajit,

You can keep it default. It will check in your host machine. If you have installed git in your system. It will detect the path. But if you want to set the path, then check in your system and paste it in Jenkins.

Related Questions In Jenkins

0 votes
2 answers

Error Jenkins: Failed to connect to repository

Jenkins runs as another user, not as ...READ MORE

answered Aug 7, 2019 in Jenkins by Sirajul
• 59,230 points
10,675 views
0 votes
1 answer

Error while talking to remote Oracle DB using Jenkins-CI

I installed Oracle XE to talk to ...READ MORE

answered May 1, 2018 in Jenkins by shubham
• 7,340 points
2,066 views
0 votes
1 answer

Jenkins failed to set git

Change to the jenkins user and run the command ...READ MORE

answered Jul 19, 2018 in Jenkins by Kalgi
• 2,680 points
5,581 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,062 views
+2 votes
1 answer
0 votes
1 answer

Failed to connect to repository : Failed to create http proxy uri

Hi, To avoid this error, you have to ...READ MORE

answered Apr 10, 2020 in Jenkins by MD
• 95,460 points
2,774 views
+1 vote
3 answers

How to auto build a job in jenkins if there is any change in code on Github repository?

To automatically run build on code commit, follow ...READ MORE

answered Jul 31, 2019 in Jenkins by Sirajul
• 59,230 points
78,898 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP