Jenkins-Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted

Problem

Error validating server certificate for ‘https://192.168.1.12:443‘:
– The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
– The certificate hostname does not match.
Certificate information:
– Hostname: MS
– Valid: from Thu, 14 May 2015 17:24:51 GMT until Sun, 11 May 2025 17:24:51 GMT
– Issuer: MS
– Fingerprint: ac:bb:e8:17:d1:91:06:d0:2c:e2:b4:b5:54:e3:bc:60:e5:d7:93:17
(R)eject, accept (t)emporarily or accept (p)ermanently? svn: OPTIONS of ‘https://192.168.1.12/svn/JenkinsTest/trunk/settletest‘: Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (https://192.168.1.12)
Failed build for org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder@1bad6fe6

Solution:

Go to machine where Jenkins is installed and issue svn checkout command as below:

[root@localhost tmp]# svn checkout https://192.168.1.12/svn/MS/WorkflowMagt –username=mitesh51

It will ask to accept Fingureprint permanently!

Done!


Configure artifactory in Jenkins. Go to Manage Jenkins -> Configure Syatem.

Provide, URL and credentials for Artifactory.

Go to specific build Job in Jenkins. In the Build Environment section, select Resolve artifacts from Artifactory.

Click on Refresh and select resolution releases repository.

2015-05-30 10_03_35-CounterApp Config [Jenkins]

In a Post-build step, select Deploy artifacts to Artifactory. Click on Refresh button.

Select Target Release repository and Target Snapshot repository.

2015-05-30 10_04_44-CounterApp Config [Jenkins]

Click on Override default deployer credentials and give credentials of User we created here.

2015-05-30 10_05_49-

Set any deployment properties if you want.

2015-05-30 10_07_20-CounterApp Config [Jenkins]

Build the Job. Observe that all .jar files are stored in Artifactory.

2015-05-30 14_27_11-

Once all jar files are downloaded, job will be successful .

2015-05-30 14_27_31-CounterArtifactoryTest #6 Console [Jenkins]

Verify lib-release directory from Artifactory. It will have all jar files required to build job.

2015-05-31 08_31_39-Index of libs-release_

Verify whether end product of Build job or WAR file is available in the Artifactory or not.

2015-05-31 08_32_01-Artifactory@MS __ Repository Browser

Done!


Before creating User, let’s create local repositories specific to Jenkins. How to create repository in Artifactory.

Click on the users and select Permissions to verify permissions assigned to user.

2015-05-30 09_33_57-Artifactory@MS __ Users Management

Go to Security-> Permissions

2015-05-30 09_34_35-Artifactory@MS __ Users Management

 

Click on New. Provide name and select repositories which we have created specific to Jenkins. to associate permissions with.

2015-05-30 09_36_09-Artifactory@MS __ Permissions Management

Select Repositories.

2015-05-30 09_43_18-Artifactory@MS __ Permissions Management

Click Ok.

2015-05-30 09_43_32-Artifactory@MS __ Permissions Management

Click on specific permission to assign it with User. Select Users Tab. Assign specific rights and click on Save.

2015-05-30 10_00_38-Artifactory@MS __ Permissions Management

Done!