I'm trying to set up the credentials for github in a jenkins pipeline job. I have the following in my pipeline script:
pipeline {
agent any
git([url: 'ssh://git@github.com/user/repname/', branch: 'master', credentialsId: 'xxx-xxx-xxx'])
Where does the credentialsId come from? Is this created elsewhere in Jenkins?
Update:
I pulled the credentials id from this page:
But now I am seeing this error:
Started by user anonymous org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 3: Undefined section "git" @ line 3, column 5.