简体   繁体   English

通过代理的Jenkins SVN插件

[英]Jenkins SVN Plugin through Proxy

I am having trouble setting up the Jenkins SVN plugin behind a proxy. 我在代理后面设置Jenkins SVN插件时遇到问题。

According to the docs: 根据文档:

https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin

You can set the proxy in C:/Users//AppData/Roaming/Subversion/servers (Windows) or ~/.subversion/servers (Linux) 您可以在C:/ Users // AppData / Roaming / Subversion / servers(Windows)或〜/ .subversion / servers(Linux)中设置代理

I have done this, I am on a unix box and have configured the ~/.subversion/servers correctly and can successfully SVN checkout directly on the command line from the box that Jenkins is running on. 我已经这样做了,我在一个Unix机器上,并且已经正确配置了〜/ .subversion / servers,并且可以从Jenkins所运行的机器上直接在命令行上成功完成SVN检出。

When I try to checkout through SVN in Jenkins however, I get this error: 但是,当我尝试在Jenkins中通过SVN结帐时,出现此错误:

Caused by: org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: HTTP proxy authorization failed at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:62) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:262) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:451) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:382) ... 75 more 由以下原因引起:org.tmatesoft.svn.core.SVNAuthenticationException:svn:E170001:org.tmatesoft.svn上的org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:62)的HTTP代理授权失败org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)org.tmatesoft.svn的.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)在org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:262) org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:382)上的.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:451).. 75更多

So the configurion in the servers file is working, but doesnt seem to be picked up in Jenkins. 因此,服务器文件中的配置正在运行,但在Jenkins中似乎没有使用。

I have also set the proxy details in the Manage plugins -> advanced page, and can successfully download and update plugins through Jenkins. 我还在“管理插件”->“高级”页面中设置了代理详细信息,并且可以通过Jenkins成功下载和更新插件。

Is there something else I need to setup the SVN plugin not covered in the docs? 我还需要设置文档中未涵盖的SVN插件吗?

Jenkins is running on a Tomcat server. Jenkins在Tomcat服务器上运行。

It seems you just need to remove ~/.subversion directory and try to rebuild your project. 看来您只需要删除〜/ .subversion目录并尝试重建您的项目。 It helps in some cases 在某些情况下有帮助

The error message is saying that proxy authorization failed. 该错误消息表明代理授权失败。 Is the Jenkins server running under the same user id that you did your command line test? Jenkins服务器是否以与您进行命令行测试相同的用户ID运行? If not does the server user id have access through the proxy? 如果不是,服务器用户ID是否可以通过代理访问? This system user will/may not be using ~/.subversion/servers file that you configured. 该系统用户将/可能不会使用您配置的〜/ .subversion / servers文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM