Jenkins git-lfs错误记录

 问题记录:

Jenkins构建时报git-lfs相关错误,如:

hudson.plugins.git.GitException: Command "git checkout -f 96b9583cbb1f2b7a5afe1d063b7f8680caa8db4c" returned status code 1:

stdout:

stderr: HEAD is now at 96b9583c 1.修复bug

This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.

hudson.plugins.git.GitException: Command "git checkout -f 96b9583cbb1f2b7a5afe1d063b7f8680caa8db4c" returned status code 128:

stdout:

stderr: git-lfs filter-process: git-lfs: command not found

fatal: The remote end hung up unexpectedly


解决方法:

终端git --exec-path,打印出的路径为:/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core,将/usr/local/bin/git-lfs拷贝到上述git-core路径下,重新构建后成功。

参考:https://github.com/git-lfs/git-lfs/issues/640

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。