Git lfs fetch with git protocol is failing
I can no longer fetch files (or clone) using LFS and the Git protocol. I have tested from multiple machines, on multiple repositories and asked colleagues to test, they are seeing the same issue. It used to work until recently.This is the error I am getting (fetch output is cleaner but you can alsogit clone git@hf.co:runwayml/stable-diffusion-v1-5):$ git lfs fetch --all
fetch: 40 objects found, done.                                                  
fetch: Fetching all references...
batch request: unexpected end of JSON input0 B/s                                
error: failed to fetch some objects from 'https://hf.co/runwayml/stable-diffusion-v1-5.git/info/lfs'UsingGIT_TRACE=1the error comes from here:14:25:54.392991 trace git-lfs: tq: sending batch of size 40
14:25:54.393331 trace git-lfs: run_command: ssh git@hf.co git-lfs-authenticate runwayml/stable-diffusion-v1-5 download
14:25:54.393494 trace git-lfs: exec: ssh 'git@hf.co' 'git-lfs-authenticate runwayml/stable-diffusion-v1-5 download'
14:25:55.631165 trace git-lfs: ssh: git@hf.co failed, error: unexpected end of JSON input, message:  (try: 0/6)Can anyone reproduce this and do you have an idea where it comes from?
2024-05-03T18:58:24Z
I too am experiencing issues, perhaps the network is saturated.Downloading model-00001-of-00004.safetensors (3.9 GB)
Error downloading object: model-00001-of-00004.safetensors (6b2ad54): Smudge error: Error downloading model-00001-of-00004.safetensors (6b2ad54dc70d94849c10d97b6d2faa80e9c94b21d3b7f67343ffa7b79809d88f): batch request: unexpected end of JSON input
2024-05-04T14:09:10Z
Just adding myself to the list here: I am instead trying to push on private repositories, but I’m getting the same error “unexpected end of JSON input” from multiple repositories, accounts, and machines. This is only related to LFS, while normal files like README.md can be pushed without any issue.If somebody has a solution or any updates on the matter, I’d be happy to try/know!
2024-05-04T15:42:02Z
I’d tempted to think we used up our free bandwidth, but reading the perks of upgrading accounts says nothing about increased download caps? I’m happy to upgrade.
2024-05-04T15:52:08Z
Update: unless the problem was coincidentally fixed in this moment, then, using git clone with https instead of ssh had just worked for me.git clone https://huggingface.co/.....Usually I use SSH and clone like thisgit clone git@hf.co:.....but the SSH method is providing that “end of JSON” exception, similar to what y’all are experiencing. Try https instead!
2024-05-04T16:04:42Z
SSH is certainly having issues.
2024-05-04T22:14:42Z
For everyone failing to dogit push, the following workaround did it for me:Switch your remote tohttps, e.g.git remote set-url origin https://hf.co/.../reponame.gitKill your git credentials by clearing~/.git-credentialsand doinggit credential-cache exitRegenerate aUser Access Tokenwith correct permissionsgit pushand enter everything when prompted.
2024-05-05T08:46:37Z
Thanks@dpaleka, works like a charm! It would be great to get back to SSH keys soon, but for the time being this works.
2024-05-05T18:17:55Z
The same error for me,Cannot do git pull from a repo at HF: lfs fails
2024-05-05T18:53:25Z
As for me, a proper temporary workaround isgit config --add lfs.url "https://huggingface.co/NickKolok/repo_name.git/info/lfs"Taken here:Files get skipped, repository or object not found. · Issue #1151 · git-lfs/git-lfs · GitHubStill looks like git-lfs is a scam.
2024-05-06T20:36:52Z
Same issue here.git checkoutandgit mergeof a remote branch to local through SSH is failing with:Downloading <object> (13 KB)
Error downloading object: <object> (): Smudge error: Error downloading <object> (<object>): batch request: unexpected end of JSON input

Errors logged to ----
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: <object>: smudge filter lfs failedSwitching tohttpsdoes resolve the issue for now. This is not a solution, SSH needs to work.
2024-06-04T15:41:02Z
I think it works now, HF must have fixed it at some point.