
答え1
ジョブ DSL を使用してパイプライン ジョブを作成する場合は、資格情報を次のように設定できます。
scm {
git {
remote {
github('account/repo', 'ssh')
credentials('github-ci-key')
}
}
}
見るhttps://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-definition-cpsScm-scm-git