7
votes

I set up git-lfs on my private repository and everything works perfectly from the command line.

I set up my TeamCity build agents to have git-lfs installed and initialized. However, when I try running it though the TeamCity build, the git-lfs pull command hangs forever, and no data is transferred at all. My task manager shows git-lfs.exe existing, but being idle. When manually testing it from the work folder of the agent (on the agent machine), git-lfs pull or git lfs pull successfully downloads all the large files.

My build configuration has the git-lfs pull as the very first build step and it executes immediately after the sources have been updated.

Does anyone know why running git-lfs pull via TeamCity build process is any different than running git-lfs pull on the command line inside the build agent?

I'm using TeamCity 10.0.2 (42234) and my agents are updated.

2
Did you get resolution on this? We are on 9.x and started using LFS, and discovered it's not supported until 10.x. Were you able to get LFS working correctly under TC 10?Ken Mason
We had a similar situation as Ken, but then updated to 10. However, it still doesn't work. Maybe because we're doing the checkout on server, and maybe it's only supported on the agent? (and the agents don't seem to have git installed) However, ours doesn't hang. Instead it just seems to not do the LFS stuff (or it's being very quiet about it, and that they aren't working)...Svend Hansen
As of 10.0.4 its only for agents (and agents are generally default side of checkout now)kwesolowski
Having similar challenges to make it work with ssh key used by TeamCity VCS root and Artifactory,but no luck appears to open issue with TeamCity youtrack.jetbrains.com/issue/TW-59720 env: TeamCity 2018.1.3 (build 58658) , Artifactory 5.11.2 Ref: github.com/git-lfs/git-lfs/blob/master/docs/api/…JosephKumarMichael

2 Answers

9
votes

Run "git-lfs install --system" to enable lfs feature on agent.

0
votes

With TeamCity running as the system user I was unable to get LFS working. The solution for me was to switch the service to running as a named user and run git lfs install when logged in as that user.