go-cd

Facing SSL certificate problem error in adding material in GoCD pipeline in windows


Facing the below isssue.

Error performing command: --- Command --- git ls-remote http://gbs05291:******@git...pro/scm/fbkpla/gocd-mobileapp.git refs/heads/InvestmentApp_GoCDTest --- Environment --- {} --- INPUT ----

--- EXIT CODE (128) --- --- STANDARD OUT --- --- STANDARD ERR --- STDERR: fatal: unable to access 'http://*********repoIP**/scm/fbkpla/gocd-mobileapp.git/': SSL certificate problem: self signed certificate in certificate chain

1.Tried adding the certificate to keystore in gocd server with the below command.. keytool -importcert -file "C:\Users\Desktop\BitBucket.cer" -keystore "C:\Program Files (x86)\Go Server\config\keystore"

2.Tried git config --global http.sslVerify false

Please note :Able to clone the same repo from git bash.


Solution

  • Download the certificate, convert it into .pem file and add the .pem certificate to git config at either system level, global level or local level, depending on the requirement. This will resolve SSL self signed certificate problem.

    Converting .crt to .pem file using OpenSSL:

    x509 -outform der -in /certificate.crt -out /certificate.pem

    add certificate to git config:

    git config --system http.sslCAInfo /certificate.pem