我试图通过运行 curl
命令从 Github Action 触发 Jenkins webhook,但出现 SSL 错误。我怎样才能解决这个问题?我尝试在命令中添加 --insecure
标志,但还是不行。
这是它的样子
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"}}'
错误 curl: (60) SSL certificate problem: unable to get local issuer certificate
当我添加 --insecure
时出现此错误:curl: (56) OpenSSL SSL_read: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate, errno 0