【发布时间】:2017-05-25 01:49:27
【问题描述】:
我正在尝试使用“Http 请求插件”进行简单的 POST 请求。我的问题是让凭据正常工作。我设置了一个全局凭据,user:pass。
但是在我的代码中尝试这个
withCredentials([usernameColonPassword(credentialsId: 'akamai', variable: 'akamai')]) {
def response = httpRequest url: requestUrl, contentType: requestContentType, httpMode: requestHttpMode, requestBody: requestContent, authentication: akamai
echo "Status: ${response.status}\nContent: ${response.content}"
}
结果
java.lang.IllegalStateException: Authentication 'user:pass' doesn't exist anymore
【问题讨论】:
标签: groovy jenkins-plugins jenkins-pipeline