Daniel Beck edited a comment on Bug JENKINS-21785

I think I fixed the case of exceptions during post-commit notifications (notifyCommit):

https://github.com/daniel-beck/subversion-plugin/tree/notify-commit-external-credentials
https://github.com/daniel-beck/subversion-plugin/commit/aabd40a550461b08296ff3e971c80915ba22d9e0
(not a PR because it's not nice enough; feel free to build on this)

Have never seen the specific exception stack trace from the original report, so I don't know whether that is also resolved (but I doubt it).


To be specific, this is the case I resolved with this change:

1. Set up an SVN repo, anywhere. Can be locally file://...; no auth required.
2. Add an external somewhere that required credentials for access (below I used a repo accessed via HTTPS)
3. Check out the first repo
4. Build once to get the 'WARNING: The following realms could not be authenticated'
5. Configure additional credential for the realm it complains about, build again
6. No warning this time, external gets checked out
7. Script console:

def p = Jenkins.instance.getItemByFullName('jobname')
p.scm.getProjectLocations(p).findAll { it.remote.startsWith('https://') }.each { println it.getUUID(p) }

Result

org.tmatesoft.svn.core.SVNCancelException: svn: E200015: OPTIONS /svn/... failed
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:384)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:373)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:361)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:707)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:627)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:102)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1020)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryUUID(DAVRepository.java:148)
at hudson.scm.SubversionSCM$ModuleLocation.getUUID(SubversionSCM.java:2707)
at (user script)
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 hudson.scm.FilterSVNAuthenticationManager.getFirstAuthentication(FilterSVNAuthenticationManager.java:35)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:694)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:382)
... 89 more
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to