Last active
February 16, 2023 10:43
-
-
Save shanedroid/20ab6f1b50ac9a2d8713c570c165e598 to your computer and use it in GitHub Desktop.
Revisions
-
shanedroid revised this gist
Nov 17, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ jenkins github webhook javax.net.ssl.SSLHandshakeException: sun.security.validat 1) Fetch the certificate from local GitHub: ``` openssl s_client -connect www.github.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/github_public.crt ``` 2) Import the certificate into the keystore. (I am using Ubuntu 14.04 with Open JDK 7): -
shanedroid revised this gist
Nov 17, 2016 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,14 @@ jenkins github webhook javax.net.ssl.SSLHandshakeException: sun.security.validat ``` 1) Fetch the certificate from local GitHub: ``` sudo openssl s_client -connect www.github.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/github_public.crt ``` 2) Import the certificate into the keystore. (I am using Ubuntu 14.04 with Open JDK 7): ``` /usr/lib/jvm/default-java/bin/keytool -import -alias www.github.com -keystore /usr/lib/jvm/default-java/jre/lib/security/cacerts -file /tmp/github_public.crt ``` 3) Bounce Jenkins: `service jenkins restart` -
shanedroid revised this gist
Nov 17, 2016 . 1 changed file with 11 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,13 @@ I needed to do this as a workaround while running Jenkins via HTTPS, for some reason I was unable to get any GitHub Webhooks to work and would see the following errs in Jenkins log: ``` bash jenkins github webhook javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ``` 1) Fetch the certificate from local GitHub: `sudo openssl s_client -connect www.github.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/github_public.crt` 2) Import the certificate into the keystore. (I am using Ubuntu 14.04 with Open JDK 7): `/usr/lib/jvm/default-java/bin/keytool -import -alias www.github.com -keystore /usr/lib/jvm/default-java/jre/lib/security/cacerts -file /tmp/github_public.crt` 3) Bounce Jenkins: `service jenkins restart` -
shanedroid revised this gist
Nov 17, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ I needed to do this as a workaround while running Jenkins via HTTPS, for some reason I was unable to get any GitHub Webhooks to work and woul dsee the following errs in Jenkins log: ``` bash jenkins github webhook javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ``` -
shanedroid renamed this gist
Nov 17, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
shanedroid created this gist
Nov 17, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ I needed to do this as a workaround while running Jenkins via HTTPS, for some reason I was unable to get any GitHub Webhooks to work and woul dsee the following errs in Jenkins log: ``` jenkins github webhook javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ```