SVN authentication fails on Windows
For Bamboo version 2.4 and greater
Cached svn authentication has been disabled in Bamboo 2.4. You do not need to roll back the SVNKit library jar.
症状
SVN authentication fails with this error:
com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code to 'null' for 'SECURITY-TRUNK': svn: Cannot read from 'C:\Documents and Settings\Default User\Application Data\Subversion\auth\svn.simple\2c897b0a1ee600f4f74b2ee6c4fe585b': C:\Documents and Settings\Default User\Application Data\Subversion\auth\svn.simple\2c897b0a1ee600f4f74b2ee6c4fe585b (The system cannot find the file specified)
....
Caused by: java.io.FileNotFoundException: C:\Documents and Settings\Default User\Application Data\Subversion\auth\svn.simple\2c897b0a1ee600f4f74b2ee6c4fe585b (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.createFileInputStream(SVNFileUtil.java:1339)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.openFileForReading(SVNFileUtil.java:1325)
原因
This error appears for Windows users running Bamboo 2.3.1 with the newer SVNKit 1.3 library. The file access problem is probably caused by a SVNKit bug with NTLM authentication, the real cause is unknown.
For further details see, this SVNKit bug report.
ソリューション
Roll back SVNKit version, by following these steps:
- Stop Bamboo and all remote agents;
- Remove
svnkit-1.3.0.5847.jar
,jna-3.0.9.jar
andtrilead-ssh2-build213-svnkit-1.3-patch.jar
from<bamboo-install>/webapp/WEB-INF/lib;
- Replace with the 3 attached files;
- Important: remove the complete Bamboo working copy in
<bamboo-home>/xml-data/build-dir
on the server and in<bamboo-agent-home>/xml-data/build-dir
on remote agents. If you are using elastic agents with EBS snapshots you need to remove the working copy on the snapshot volume re-snapshot to remove the working copy permanently. - Restart Bamboo and remote agents.