用EGIT克隆Bitbucket存储库时的Git LFS错误



使用eclipse egit克隆存储库时,我会遇到错误。

git-lfs 2.4.0通过酿造和通常的位置安装。

$ which git-lfs
/usr/local/bin/git-lfs

命令行上的HTTPS克隆正常工作。

$ git clone https://...@bitbucket.org/.../<repos>.git
Cloning into '<repos>'...
remote: Counting objects: 3453, done.
remote: Compressing objects: 100% (2289/2289), done.
remote: Total 3453 (delta 1073), reused 3328 (delta 1009)
Receiving objects: 100% (3453/3453), 7.33 MiB | 374.00 KiB/s, done.
Resolving deltas: 100% (1073/1073), done.
Checking out files: 100% (3070/3070), done.
Filtering content: 100% (309/309), 197.75 MiB | 1.80 MiB/s, done.

用蚀氧克隆4.7.3a和eclipse egit 4.9.2时,克隆操作正常工作,但是当检索LFS资产时存在错误:

org.eclipse.jgit.api.errors.FilterFailedException:
Execution of filter command 'git-lfs smudge -- '<file1>'' on file '<file1>'
failed with return code '127', message on stderr:
'git-lfs smudge -- '<file1>': git-lfs: command not found'
org.eclipse.jgit.api.errors.FilterFailedException:
Execution of filter command 'git-lfs smudge -- '<file2>'' on file '<file2>'
failed with return code '127', message on stderr:
'git-lfs smudge -- '<file2>': git-lfs: command not found'

似乎没有发现/usr/local/bin中的git-lfs。如果我打开Eclipse终端,echo $PATH打印:

/usr/bin:/bin:/usr/sbin:/sbin

但是,从标准终端,echo $PATH打印:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

我是否需要将/usr/local/bin添加到Egit看到的路径上?如果是这样,该怎么做?

3我的同事都有相同的问题,我正在为C/C 开发人员的Eclipse IDE的新安装工作。

我通过在我的info.plist文件中添加以下lsenvironment标签来解决此问题。在您的应用程序文件夹中查找Eclipse,右键单击Eclipse应用程序,然后选择" Show package contents"。然后在内容文件夹中您应该有一个info.plist文件。用您喜欢的文本编辑器打开它,并在第一个标签下添加以下内容。

<key>LSEnvironment</key>
    <dict>
        <key>PATH</key>
            <string>/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
    </dict>

然后重新检查您的应用程序(确认您的eclipse.app路径(:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/Eclipse.app 

有关启动服务键的更多信息,请参见:https://developer.com/library/archive/documentation/general/general/reference/infoplistkeyreference/articles/launchserviceskeys.html

归功于以下页面的作者提供给我的信息,以显示如何执行此操作:https://wiki.eclipse.org/ptp/ptp/photran/documentation/photran8installationunstallation#additional_instructions_for_for_mac_os_os_os_os_x_users

最新更新