2

Im new on jenkins technologie.

I started with creating a jenkins job that pull code from gitlab to jenkins. this job did not worked as I had an issue tells that jenkins does not trusted the self signed certificate used by the gitlab server

issue in screenshot enter image description here

Can I did some configuration from the jenkins inetrface (from web site) to allow cloning the self signed certificate.

Any help is really appreciated.

Thank you

xxxvodnikxxx
  • 1,270
  • 2
  • 18
  • 37
B.Bechir
  • 21
  • 1
  • 6
  • Maybe there you will find helpful info- https://stackoverflow.com/questions/16721629/jenkins-returned-status-code-128-with-github One reason can be your machine is not trusting github/github certificate, otherwise from some reason it tries to access to repo with key, which was not given (you can manage certs in credentials by clicking to "add") . – xxxvodnikxxx Apr 04 '18 at 11:02
  • thank you for your quick reply, " you can manage certs in credentials by clicking to "add" -> in the jenkins interface ? – B.Bechir Apr 04 '18 at 11:09
  • Check your screenshot.. There you have the button.. But its a credentials, which can be used to connect to the git, not the trusted server certificates, what will be the issue I guess.. The you will have to follow answer bellow. – xxxvodnikxxx Apr 04 '18 at 11:10

2 Answers2

2

Caution: To be used only by understanding the security issues that will crop-up by this behaviour.

My company is hosting github enterprise with a custom certificate and hence faced similar situation. Following is the work-around I've done to mitigate the issue.

  • Login to jenkins server as jenkins user (I've used sudo su jenkins to do this in my case).
  • Add the following lines to ~/.gitconfig and save.
[http]  
    sslVerify = false
  • Restart jenkins server.
Ganesh Pendyala
  • 371
  • 4
  • 7
0

From the image you haven't specified any credentials when trying to access your repo generally you would mention some form of credentials

apart from that your computer doesn't trust the certificate from gitlab you have to add the certificate into your git(installed location) This link will give you a detailed explaination :)

server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

rohit thomas
  • 2,302
  • 11
  • 23