简体   繁体   中英

troubles with jenkins/svn externals - auth error

I am setting up a new jenkins server and am running into a problem. when synching my svn repo I get this error on the externals:

Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: No
credential to try. Authentication failed
       at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:37)
       at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:32)
       at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getFirstAuthentication(DefaultSVNAuthenticationManager.java:185)
       at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:598)
       at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:298)
       ... 40 more
Caused by: svn: E200015: No credential to try. Authentication failed
       at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
       at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:154)
       at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:97)
       ... 45 more

The credentials used for the main repo should work everywhere (they do on other Jenkins instances).

Any ideas?

And what is the proper procedure to update credentials?

thanks

I figured it out. The external was on a different server. Apparently the svn client that jenkins uses isn't smart enough to apply the credentials to a different server. The svn native client/tortoise do handle this case.

I had to enter a second svn url for the external on the jenkins job and then enter the credentials as promoted. Then the credentials get stored the the jenkins server. I can then delete the second svn url from the job.

Another way to do this is to edit the subversion.credentials file stored in the job definition in the Jenkins Home directory. The passwords are hashed, but if you use the same credentials in multiple repos, you can just copy it from another entry and you'll be all set.

I found this technique useful for times that the apparent URL of the repo appears different from the Jenkins box than it does from the build slave. I was able to just copy the entire credentials entry and change the url as appropriate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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