Build Agent doesn`t support git-lfs

Answered
  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

2
11 comments

That wasn't clear for me from the random command lines. Did you setup TeamCity to use the locally installed git instead of it's internal one? And can you manually execute the commands on the system to checkout the repository?

1

If I read it correctly you use the locally installed git version? In that case shouldn't you manually install git-lfs on that system? 

 

 

0

>If I read it correctly you use the locally installed git version? In that case shouldn't you manually install git-lfs on that system? 
I have showed data from the build machine where git installed.

0

>Did you setup TeamCity to use the locally installed git instead of it's internal one?
git have been installed as well on machine

>And can you manually execute the commands on the system to checkout the repository?
I can build the project manually via command line if you meant this

0

if you have 

Native Git operations:
enabled

under Diagnostics > Git

And you have rebooted the system after Git installation.

 

Then I'm unsure what the possible problem could be.

 

0

I have deleted git-lfs that I have installed manual.
In the  Diagnostics > Git

0

resolved- need to delete local  git-lfs support from your build machine.

0

UPD:
>resolved- need to delete local  git-lfs support from your build machine.
after this the error still exists.

result of git lfs install is Git LFS initialized.

I got this type of error:
Failed to perform checkout on agent:  command failed.
  exit code: 128
  stderr: git-lfs filter-process: git-lfs: command not found
  fatal: the remote end hung up unexpectedly
build machine completely has in .bash file this and the same in .zshrc
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/bin/git-lfs:$PATH

0

Pavel Bahratsou

Pavel Bahratsou

Hello Pavel,

Did you manage to resolve the problem?

I am having the same issue with TeamCity Professional 2023.05 (build 129203). 

Failed to perform checkout on agent: /usr/bin/git -c credential.helper= checkout -q -f master command failed. exit code: 128 stderr: git-lfs filter-process: git-lfs: command not found fatal: the remote end hung up unexpectedly

git-lfs program is available to all systems, even I click for "Open Terminal" on a build agent, however in every checkout there is a problem with "git-lfs" not being found.

Niels, maybe you have some more ideas on this one?

Thanks!

0
Please note that git-lfs installation is user-specific. If it is available for one user account, it doesn't mean it is also available for others. Check which user account the build agent uses, and make sure that the executable is found when you run `which git-lfs` / `Get-Command git-lfs` on behalf of that user.
0

Anatoly Cherenkov

Thanks for the comment, although it was unhelpful.

TL;DR I managed solve the problem by creating a symbolic link to git lfs executable: https://stackoverflow.com/a/69007609

0

Please sign in to leave a comment.