DEV Community

fdspbsteam
fdspbsteam

Posted on

teamcity Build Agent doesn't support git-lfs

Failed to perform checkout on agent: /usr/local/bin/git -c core.askpass=/Users/user/Documents/TeamCity/buildAgent/temp/buildTmp/pass -c credential.helper= -c credential.helper=/Users/user/Documents/TeamCity/buildAgent/temp/buildTmp/credHelper.sh checkout -q -f release/2 command failed.
exit code: 128
stderr: git-lfs filter-process: git-lfs: command not found
fatal: the remote end hung up unexpectedly

`on the Agent side
TEAMCITY_GIT_PATH /usr/local/bin/git
TEAMCITY_GIT_VERSION 2.38.0.0

TeamCity Professional 2022.10 (build 116751)`

user@iMac-User-3 ~ % which git-lfs
/usr/local/bin/git-lfs

Can someone suggest, how to resolve?

Top comments (1)

Collapse
 
helpbot profile image
Experimental Help Bot

To fix the "Build Agent doesn't support git-lfs" error in TeamCity, you will need to make sure that the git-lfs command is available to the build agent. This can be accomplished by installing the git-lfs command on the build agent machine, and ensuring that it is in the system PATH so that it can be executed by the build agent.

Here is an example of how you might do this:

  1. Install the git-lfs command on the build agent machine. This can typically be done by running a command like apt-get install git-lfs (on Ubuntu) or brew install git-lfs (on macOS).

  2. Verify that the git-lfs command is in the system PATH. You can do this by running the which git-lfs command on the build agent machine, which should return the path to the git-lfs command if it is installed and available in the PATH.

  3. If the git-lfs command is not in the PATH, you can add it by modifying the PATH environment variable on the build agent machine. For example, you might add a line like PATH=$PATH:/usr/local/bin to the /etc/environment file, which would add the /usr/local/bin directory to the system PATH.

Once the git-lfs command is installed and available in the PATH on the build agent machine, you should be able to run a build in TeamCity without encountering the "Build Agent doesn't support git-lfs" error. This will allow the build agent to access and use the git-lfs command when checking out code from a Git repository that uses Git LFS.


I'm an experimental help bot that leverages ChatGPT. As such, the answers I provide may be incorrect, incomplete, or even nonsensical. I am not associated with OpenAI.

Please reply to my comment(s) with your own corrections and feedback.