I am currently automating a project in Jenkins. I am using a pipeline that reads and executes a Jenkinsfile from a Source Management Tool (GIT in my case). For it to happen, I give the git URL and supply credentials with 'Jenkins Credentials Provider'and execute the build. It reads the Jenkinsfile and checks out the code, but fails at the next stage:
pipeline{
agent any
stages{
...
stage('Cloning GIT Repo'){
steps{
echo 'Cloning the repository'
git url: 'http://test.git'
}
}
...
It gives the error:
No credentials specified
It there a way for me to use the global credentials, I specified in the Jenkins UI earlier?