【发布时间】:2019-08-06 06:56:18
【问题描述】:
我目前正在 Jenkins 中自动化一个项目。我正在使用从源管理工具(在我的情况下为 GIT)读取和执行 Jenkinsfile 的管道。为此,我提供了 git URL 并使用“Jenkins Credentials Provider”提供凭据并执行构建。它读取 Jenkinsfile 并检查代码,但在下一阶段失败:
pipeline{
agent any
stages{
...
stage('Cloning GIT Repo'){
steps{
echo 'Cloning the repository'
git url: 'http://test.git'
}
}
...
它给出了错误:
No credentials specified
我有办法使用之前在 Jenkins UI 中指定的全局凭据吗?
【问题讨论】:
标签: jenkins automation jenkins-pipeline