Jenkins没有使用给定的SCM凭据来共享库

时间:2019-04-30 14:07:11

标签: jenkins svn shared-libraries credentials

我让bin正确配置了全局共享库,就像在Jenkins Server的全局配置中向我展示的那样。在“管道作业”中,我尝试使用指定的库,但收到错误消息,即未使用任何凭据从SCM检出库。

库配置

enter image description here

  • 名称:LIBRARY
  • 默认版本:trunk-当前映射至修订版:125
  • 隐式加载:[ ]
  • 允许覆盖默认版本:[x]
  • 在工作最近的更改中包括@Library更改:[x]
  • 现代SCM (o)
  • 旧版SCM ( )
  • Git ( )
  • GitHub ( )
  • Mercurial ( )
  • Subversion (o)
  • 项目存储库库:http://scrambled/url/repo/LIBRARY
  • 凭据:Scrambly/******
  • 包括分支:trunk, tags/*

管道

@Library('LIBRARY@trunk')

pipeline {
    // Imagine some content //
}

错误消息

Checking out http://scrambled/url/repo/LIBRARY at revision 123
Using sole credentials <none> in realm ‘<http://scrambled> Scrambler’
ERROR: Subversion checkout has been canceled
org.tmatesoft.svn.core.SVNCancelException: svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:694)
Caused: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.
svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.

尽管我将共享库配置为使用特定凭据,但我不理解它表示错误消息中有<none>个凭据。

谢谢大家的建议。

1 个答案:

答案 0 :(得分:0)

我通过使用https git url来解决此问题:

https://{username}:{passwd}@xxxxx.git