Failing on Git fetch

I just setup TeamCity 9.0.3, and when trying to execute a build I get the following error:

Failed to collect changes, error: Error collecting changes for VCS repository '"xxx" {instance id=7, parent internal id=1, parent id=cj_cjo, description: ""}' 'git fetch' command failed. stderr: Packfile is truncated.

Couldn't find anything particular to truncated Packfile.  I added "Enforce Clean Checkout" but no change.

Any ideas?


1 comment
Comment actions Permalink

The question was processed by email:

The answer was:
This error happens in 2 cases: when a pack file on TeamCity server machine is corrupted and when TeamCity downloads a corrupted pack file from a git server.
The first case should be fixed by removing the clone directory on the server. You can find the repository clone location from <TeamCity data dir>/system/caches/git/map file, it contains mapping from an url to the directory where repository was cloned.
The second case can occur if the git server produces a wrong patch. Check that you can clone the repository using command-line git on a TeamCity server machine.

The solution was:
Turns out because of the size of the repo, the HTTP protocol was timing out. Switched to SSH and it works.


Please sign in to leave a comment.