0

When I try to give GitHub repository URL in Source Code Management (GIT) in Jenkins, I'm getting this error:

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

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
suresh
  • 1
  • What does the result of: `GIT_CURL_VERBOSE=1 GIT_TRACE=1 git ls-remote -h https://github.com/chowdarydevops/test.git HEAD` show? Also, what operating system and version of git are you using? – Scott Robert Schreckengaust Jul 24 '19 at 16:58

1 Answers1

0

Most likely the SSL certificate is unable to be verified so SSL/TLS may need to add the relevant CRT for your system.

  • These insecure and NOT recommended methods may help bypass the verification process for troubleshooting purposes:
GIT_SSL_NO_VERIFY=true git ls-remote -h https://github.com/chowdarydevops/test.git HEAD

or

git -c http.sslVerify=false ls-remote -h https://github.com/chowdarydevops/test.git HEAD

see how-can-i-make-git-accept-a-self-signed-certificate and how-do-i-set-git-ssl-no-verify-for-specific-repos-only for more info