I have many git repositories hosted on Bitbucket, some of which also have LFS enabled.
Also, in my system I have manually installed the latest version of git and git-lfs.
SourceTree is configured to use those git and git-lfs installed in the system (and not the embedded version).
In these circumstances, whenever I try to push a repository that has LFS content to be actually uploaded, the operation fails with the following message:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree -c lfs.customtransfer.bitbucket-media-api.path=git-lfs-bitbucket-media-api push -v origin refs/heads/master:refs/heads/master
Pushing to firstname.lastname@example.org:overloud/classics.git
Failed to start custom transfer command "git-lfs-bitbucket-media-api" remote: exec: "git-lfs-bitbucket-media-api": executable file not found in $PATH
However, if I open a terminal and issue a regular "git push", the operation completes successfully.
My suspect is that SourceTree sees a Bitbucket repository on the remote side and attempts to use the Bitbucket Media Adapter even if there is none installed in the system, hence the following part of the command line above causes it to fail: