I'm trying to use Jenkinsfile to clone git branches and merge them. Skeleton code is as below:
pipeline {
agent {
label ""
}
stages {
stage("Git") {
steps {
git( url: , credentialsId: )
}
}
}
}
Everytime I run this I get the error
stderr: remote: Password authentication is not available for Git operations. remote: You must use a personal access token or SSH key.
Does anyone know how to use git tokens from within jenkinsfile? I'd very much appreciate any help. Thanks