Using credentials from Jenkins store in a jenkinsfile
问题 I made a multibranch pipeline project in Jenkins. I need to use two repositories and both need credentials. I created a Jenkinsfile in repository1: node ('label1'){ stage 'sanity check' sh 'echo sanity check' stage 'checkout other repository' checkout([ $class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: 'https://BRNTZN@bitbucket.org/BRNTZN/repository2.git'],[credentialsId:'23b2eed1-2863-49d5-bc7b-bcccb9ad914d']] ]) stage 'log results' sh 'echo result = OK' } When I