Failed to perform checkout on agent: Failed to checkout repository
I had this issue in TC trying to build a solution:
Failed to perform checkout on agent: Failed to checkout repository version {NUMBER}: com.microsoft.tfs.core.clients.versioncontrol.exceptions.VersionControlException: java.lang.IllegalArgumentException: renaming: target file already exists
In a next try I got:
Failed to perform checkout on agent: Failed to checkout repository version {NUMBER}: com.microsoft.tfs.core.clients.versioncontrol.exceptions.VersionControlException: java.lang.NullPointerException
After a lot of tries, I realize that the solution had a file which full path+fileName exceeds the MAX_PATH, which is defined as 260 characters.
After exclude this file from the solution (or exclude from checkout) the solution build successfully again.
Please sign in to leave a comment.
Hi, and thanks for your feedback.
There is a couple possible workarounds to help in this situation:
-Install the build agent closer to the drive root.
-Use a checkout directory different to the default, with a shorter path (by default it might be C:\TeamCity\buildAgent\work\<hash>\, which can probably be shortened to some degree.
This said, would it be possible for you to create an issue in our tracker here: https://youtrack.jetbrains.com/issues/TW, and add there the teamcity-agent.log? This log should include the details and stacktrace of the problem. If you create it, you will be automatically notified on progress in its solution. If not, could you at least please send us the log file via the "Submit a request" button on top for review?
Thanks in advance.
Hi,
Actually the checkout directory is there, but the solution contains some packages with a looong name hehehe.
I gonna submit the log there.
Thanks!