0

I am trying to trigger a Jenkins webhook from a Github Action, by running curl command, but am getting an SSL error. How can I get around that ? I tried adding --insecure flag to the command, but still no go. Here is what it looks like

name: jenkins-trigger

on:
    repository_dispatch:
        types:
            - external-ci-success

jobs:
    build:
        name: build
        runs-on: ubuntu-latest
        steps:
            - name: Trigger Jenkins
              run: |
                  curl -X POST https://jenkins.jx.<myhost>/ghprbhook/ \
                      -H "content-type: application/json" \
                      -H "User-Agent: GitHub-Hookshot/5465ee1" \
                      -H "X-GitHub-Hook-ID: 232" \
                      -H "X-GitHub-Hook-Installation-Target-ID: 123213" \
                      -H "X-GitHub-Hook-Installation-Target-Type: repository" \
                      --data '{"pull_request":{"sha": "xxx"}}'


The error curl: (60) SSL certificate problem: unable to get local issuer certificate

When I add --insecure I get this error: curl: (56) OpenSSL SSL_read: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate, errno 0

HIT_girl
  • 785
  • 7
  • 23
  • There are some actions on the Github Marketplace (like this one: https://github.com/marketplace/actions/trigger-jenkins-job) to trigger job on Jenkins. Did you try one of them? – GuiFalourd May 02 '21 at 13:56
  • Yup, same issue from several of the marketplace actions that I tried. Something must be up with the configuration of my actions – HIT_girl May 02 '21 at 14:09
  • Could it be related with git executable? In that case, here are some references: https://stackoverflow.com/questions/9072376/configure-git-to-accept-a-particular-self-signed-server-certificate-for-a-partic or https://confluence.atlassian.com/bitbucketserverkb/ssl-certificate-problem-unable-to-get-local-issuer-certificate-816521128.html – GuiFalourd May 02 '21 at 14:22

0 Answers0