I’ve set up the Jenkins environment locally on the machine and I encountered some errors related to git-lfs.
Jenkins couldn’t recognize this command. I found this tutorial: link, but it didn’t solve my problem.
Where was the problem?
Jenkins couldn’t find git-lfs command on the machine. On some websites, I found that there could be a problem with the path and it was.
Git inside Jenkins uses the “git” command, and in my case, under git command was the path “/usr/bin/git” and in “/usr/bin/” there isn’t git-lfs. The correct path should be “/usr/local/bin/git” and in this folder, git-lfs exists inside.
To change this you need to go to Jenkins configuration.
From the main Dashboard select on the left menu Manage Jenkins -> Global Tool Configuration -> Git.
In Path to Git executable change path to correct one, in my case, it’s /use/local/bin/git.
After this change git-lfs started working.
If you encounter a similar problem, let me know via email (kornel@smashswift.com) and we can talk.