Git pull - smudge filter lfs failed
In my case the SSH-authenticated repository was updated to use LFS from another client and on my side Git-LFS didn't know about the SSH remote-url. What I did to fix it was the following:
Copy the URL configured in remote.origin.url
(push URL for origin
) to lfs.url
(the URL LFS uses):
$ git config lfs.url $(git config remote.origin.url)
(If your remote is not named origin
then change to your remote name.)
Then run
$ git config lfs.url
to show the URL and confirm that it does indeed contain an SSH url, and not some HTTP/HTTPS url.
Then you can
$ git pull
Done.
If you screwed up before and master
and orgin/master
have somehow diverged as was the case for me then you might need to git checkout -fB master origin/master
(this doesn't ask and overwrites the local version of the master branch, so beware and execute carefully!).
See also: https://github.com/git-lfs/git-lfs/issues/2661#issuecomment-335903332
In my case, I have to add one more step after following the instructions provided by the answer by @grandchild. As explained by @grandchild, my remote git repo was changed to use protocol ssh from original https recently. In my git configuration, git configuration "http.sslverify" was not set originally. I believe the default value is true if it is missing. It caused the error "smudge filter lfs failed". Once I set it to false
$ git config http.sslverify false
It works without errors.