gpt4 book ai didi

git - java.lang.NoSuchMethodError : No such DSL method 'sshagent' found among steps? 错误

转载 作者:行者123 更新时间:2023-12-05 02:51:05 26 4
gpt4 key购买 nike

在我的 Jenkins 声明管道中,我有以下内容:

 pipeline {

stages {
stage('Checkout') {
// clone using git
}
stage('Merge') {
// need to merge dev to master
merge()
}
}
}

def merge() {
sshagent(credentials : ['git-credentials-id']) {
sh "git push origin master"
}

运行管道时出现以下异常:

java.lang.NoSuchMethodError: No such DSL method 'sshagent' found among steps?

最佳答案

你只需要安装SSH Agent Jenkins plugin .

关于git - java.lang.NoSuchMethodError : No such DSL method 'sshagent' found among steps? 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63398958/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com