Reputation: 31
I am trying to configure GIT with Jenkins( source Code Management section). As soon I enter repository URL , Error pops up and stating:
Failed to connect to repository : Command "C:\Program Files\Git\bin\git.exe ls-remote -h https://xxx.xxxxx.xxxxx.xxxxxx.xxx/stash/scm/project/project.git HEAD" returned status code 128:
stdout:
stderr: fatal: unable to access 'https://xxx.xxxxx.xxxxx.xxxxxx.xxx/stash/scm/project/project.git/': SSL certificate problem: self signed certificate in certificate chain
Please guide/help how I can I skip this security Check with Jenkins (git plugin) or How self signed certificate can be installed in system to work with Jenkins on windows 7.
Jenkins Version : 2.92
GIt Plugin : version 3.6.4
Git client plugin : 2.6.0
Upvotes: 1
Views: 10501
Reputation: 31
Thanks for information, I found the solution. Its a feature of plugin that asks for security check, hence for that
See the steps below.
1)Connect to the website using SSL (https://whatever)
2)go to the Three Dots Menu -> More Tools -> Developer Tools, then click on the Security Tab. This will give you a Security Overview with a View certificate button.
3)Click on the View certificate button -> Details
A modal window will open. It has two panes. The top one shows the trust hierarchy of the site's certificate (the last one listed), the intermediate certificate(s), and the root certificate (the topmost one). The second, larger pane, shows the details of one of the certificates. There may be zero or more intermediate certificates. Note that the root certificate has a gold-bordered icon. The others have a blue border.
To Export:
4)First click on the certificate's icon in the trust hierarchy. The certificate will be shown in the main part of the modal.
5)Click on the root certificate's large icon in the main part of the modal.
6.Select the "Base64 encoded" option and then export to a .cer file on your local file system
7.Now configure Git to use the downloaded .cer file using the Git config command git config --global http.sslCAInfo C:/Users/E074236/certificate.cer
git-client pluguin from jenkins may ask for credentials.
Upvotes: 2
Reputation: 1323303
If this is working with your own account (before trying to setup Jenkins), check your git config -l.
Look for value like:
http.sslCAInfo
(to specify the CA or the self-signed certificate)http.sslVerify
(to skip the check entirely)And double-check with which account your Jenkins is running: System account or user account.
Upvotes: 0