git/jenkins TLS issue

Viewed 337

I'm getting the following error when Jenkins is trying to clone a repo

Failed to connect to repository : Command "/usr/bin/git ls-remote -h -- https://github.com/chkp-lebowits/protego-examples/ HEAD" returned status code 128: stdout: stderr: fatal: unable to access 'https://github.com/chkp-lebowits/protego-examples/': Error -50 setting GnuTLS cipher list starting with +VERS-TLS1.3

(I get similar on "git push" when i point the pipeline to a local repo to get things started and just want to push after build)

When i run the exact same command manually on the same ubuntu 20.4 VM Jenkins is deployed on, the command goes cleanly.

As you can tell, i used Jenkins Global configuration to make sure it uses the same client i use manually.

What am i missing?

enter image description here

2 Answers

This is not a problem with git or github, but with your local configuration. You’ve set GIT_SSL_CIPHER_LIST or the http.sslCipherlList to something your currently used version of gnutls does not support. When git then tells libcurl to tell gnutls to use this cipher list, gnutls tells curl that it can’t do this, and curl feeds this back to git, which is the error you are seeing.

This error may be caused by : TLS verion incompatibility. GnuTLS 1.3 is too fasion. 2 ways to fix it:

  1. Recompile git against OpenSSL,instead of GnuTLS (What's this???? )
  2. use SSH ,such as git@..... to pull your code

linked issue here

enter image description here

Related