Jenkins & GIT Hub Configuration

Hi All,

I am trying to connect Jenkins with GitHub and getting error as “Failed to connect with repository” in Jenkins.
For this I have followed below steps…

GitHub

  1. Created repository and From Settings–>IntegrationAnd Services have updated “Jenkins Hook url”.
  2. Tested connectivity and from GitHub and looks fine.

Jenkins

  1. Installed Jenkins on Tomcat.
  2. When tried to create an item with “Free style project” getting below error in connecting with GIT repo in “Source Code management”
    “Failed to connect to repository : Error performing command: git.exe ls-remote -h https://github.com/Baharul1/Try_Jenkins.git HEAD”
    3.Also have verified network connectivity looks good from system where jenkins is insta to GitHub

Can anyone please help on this.

Please note I didn’t installed GitHub on local system. Does it require to install always?

Thanks
Baharul Islam

Hi @Baharu1,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our community organized so users can more easily find information.

As you’ll notice, your topic is now here in the How to use Git and GitHub board. No action is needed on your part; you can continue the conversation as normal here.

Cheers!

You mention that you “didn’t installed GitHub”. I’m assuming that you mean that you didn’t install Git? If you didn’t install Git, that would probably be the reason why Jenkins is having a problem executing git.exe that it mentions in the error message.

I haven’t worked with Jenkins before though, so I can’t be certain.