I can successfully push a git repository that uses Git LFS to Github, but when I try to push it to my own server I get the following error: git-lfs-authenticate: not found
.
$ git push origin main |& cat
batch request: sh: 1: git-lfs-authenticate: not found: exit status 127
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done.
error: failed to push some refs to 'git.example.com:'
On the local host, I use git-lfs/2.13.2
and on the remote host git-lfs/2.7.1
. These are the current versions of Debian 10 and 11, respectively. I have tried using the latest version of Git LFS on both hosts by placing the git-lfs
binary in /usr/local/bin
. The output is now slightly different, but I still get the same error:
$ git push origin main |& cat
batch request: sh: 1: git-lfs-authenticate: not found: exit status 127
error: failed to push some refs to 'git.example.com:'
I have also tried searching for a binary named git-lfs-authenticate
but it is not present in any of the releases of Git LFS. I have also tried reading the Git LFS Server Documentation which mentions the git-lfs-authenticate
command, but it doesn't explain where to find it or how to implement it.
You probably just forgot the definition of where git
will find the LFS-Backend.
As @bk2204 already mentioned, and we assume, you checked out your repo via ssh, but most LFS backends do not support ssh connections.
Thus, you'll need to define that all/only LFS-Blobs shall be sent to https
, even though you may check out the repo itself via ssh
:
git clone ssh://git-server.com/foo/bar.git .
git config -f .lfsconfig lfs.url https://git-server.com/foo/bar.git/info/lfs
git add .lfsconfig && git commit -m"define lfs backend" && git push
What the correct lfs http url
is, depends on your git host.