** Description changed: - ## Info + [ Impact ] - ``` - $ lsb_release -rd - No LSB modules are available. - Description: Ubuntu 24.04.2 LTS - Release: 24.04 - ``` + * Git LFS users on Ubuntu 24.04 LTS cannot successfully push LFS + objects to repositories when using SSH as the remote transport. + This affects users who: + - Need to use SSH instead of HTTPS for Git remotes (common in enterprise environments) + - Are working with large binary files tracked by Git LFS (and are limited with uploads using HTTP) + - Are using self-hosted Git servers like Gitea that support LFS over SSH - ``` - $ git --version - git version 2.43.0 - ``` + * The current version (3.4.1) in Ubuntu 24.04 LTS hangs during push + operations and eventually fails with a 500 internal error when + attempting to upload LFS objects over SSH. This is a critical + workflow blocker for development teams using Git LFS with SSH remotes. - ``` - $ git-lfs --version - git-lfs/3.4.1 (GitHub; linux amd64; go 1.22.2) - ``` + * Pulling over SSH has been observed to fail or hang sporadically too. - ## Steps + * The bug has been fixed in upstream git-lfs version 3.6.1, which + successfully handles LFS transfers over SSH. - 1. Use SSH as remote + * I did the effort of backporting this fix by finding 3 patches that + will restore full Git LFS functionality for SSH users. - ``` - $ git remote set-url origin [email protected]:bartvdbraak/test-lfs-ssh.git - ``` + * Upstream bug reference: https://github.com/git-lfs/git- + lfs/issues/6017 - 2. Track and commit files with Git LFS + * Merge request: + https://code.launchpad.net/~bartvdbraak/ubuntu/+source/git-lfs/+git/git- + lfs/+merge/499415 - ``` - $ git lfs track "*.bin" - Tracking "*.bin" - $ dd if=/dev/urandom of=test.bin bs=1M count=10 - 10+0 records in - 10+0 records out - 10485760 bytes (10 MB, 10 MiB) copied, 0.0225528 s, 465 MB/s - $ git add . - $ git commit - [main fa323ab] bins - 2 files changed, 4 insertions(+) - create mode 100644 .gitattributes - create mode 100644 test.bin - ``` + [ Test Plan ] - 3. Push and observe hanging + * Prerequisites - ``` - $ git push - Locking support detected on remote "origin". Consider enabling it with: - $ git config lfs.https://git.staging.blender.org/bartvdbraak/test-lfs-ssh.git/info/lfs.locksverify true - ^Cloading LFS objects: 0% (0/1), 10 MB | 0 B/s - got status 500 when uploading OID 759d7f6378dcac8d66a3429b702efe7ad4d0c940b58300d576a1235ba9b7e605: internal error - ``` + 1. Install git-lfs from the proposed repository + 2. Set up a test repository with Git LFS support over SSH (e.g., Gitea, GitLab, or similar) + 3. Ensure SSH access is configured (SSH keys, etc.) - ## Expectation + * Reproduction Steps - 1. Update to later version (e.g. 3.6.1) - ``` - $ git-lfs --version - git-lfs/3.6.1 (GitHub; linux amd64; go 1.23.3; git ea47a34b) - ``` + 1. Clone or create a Git repository and configure SSH as the remote: + ```bash + git clone <repo-url> test-lfs-ssh + cd test-lfs-ssh + git remote set-url origin git@<your-git-server>:<username>/test-lfs-ssh.git + ``` - 2. Push LFS objects over SSH successfully + 2. Initialize Git LFS and track binary files: + ```bash + git lfs track "*.bin" + ``` + 3. Create a test binary file (10MB): + ```bash + dd if=/dev/urandom of=test.bin bs=1M count=10 + ``` - ``` - $ git push - Locking support detected on remote "origin". Consider enabling it with: - $ git config lfs.https://git.staging.blender.org/bartvdbraak/test-lfs-ssh.git/info/lfs.locksverify true - Enumerating objects: 5, done.1/1), 10 MB | 0 B/s - Counting objects: 100% (5/5), done. - Delta compression using up to 2 threads - Compressing objects: 100% (3/3), done. - Writing objects: 100% (4/4), 467 bytes | 467.00 KiB/s, done. - Total 4 (delta 0), reused 0 (delta 0), pack-reused 0 - remote: . Processing 1 references - remote: Processed 1 references in total - To git.staging.blender.org:bartvdbraak/test-lfs-ssh.git - 9c764da..fa323ab main -> main - ``` + 4. Commit the changes: + ```bash + git add . + git commit -m "Add LFS binary file" + ``` - ## Background + 5. Push to remote: + ```bash + git push + ``` - I am part of the infrastructure team at Blender. We host our own Gitea - instance at https://projects.blender.org and want to support Git LFS - over SSH (https://github.com/go-gitea/gitea/issues/17554). + * Expected Results - However, the current version of `git-lfs` on Ubuntu 24.04 LTS has a bug - where that hangs on pushes. This issue has also been described upstream - here: https://github.com/git-lfs/git-lfs/issues/6017 + With the buggy version (3.4.1): + - Push hangs at "loading LFS objects" + - Eventually fails with: `got status 500 when uploading OID ... : internal error` - ProblemType: Bug - DistroRelease: Ubuntu 24.04 - Package: git-lfs 3.4.1-1ubuntu0.3 - ProcVersionSignature: Ubuntu 6.8.0-85.85-generic 6.8.12 - Uname: Linux 6.8.0-85-generic x86_64 - ApportVersion: 2.28.1-0ubuntu3.8 - Architecture: amd64 - CasperMD5CheckResult: pass - Date: Thu Nov 13 15:42:29 2025 - InstallationDate: Installed on 2025-07-02 (134 days ago) - InstallationMedia: Ubuntu-Server 24.04.2 LTS "Noble Numbat" - Release amd64 (20250216.2) - ProcEnviron: - LANG=en_US.UTF-8 - PATH=(custom, no user) - SHELL=/bin/bash - TERM=xterm-256color - XDG_RUNTIME_DIR=<set> - SourcePackage: git-lfs - UpgradeStatus: No upgrade log present (probably fresh install) + With the fixed version (3.6.1 or later): + - LFS objects upload successfully + - Push completes without errors + - Output shows successful processing: + ``` + Uploading LFS objects: 100% (1/1), 10 MB | <speed> + Enumerating objects: ... + Writing objects: 100% ... + To <remote> + <commit>...<commit> main -> main + ``` + + * Additional Testing + - Run the test suite from the original + + [ Where problems could occur ] + + * Certain SSH configurations (non-standard ports, ProxyCommand, etc.) + might behave differently + + * Older Git servers or LFS implementations might not be compatible with + protocol changes introduced in the fix + + * Custom LFS implementations that deviate from the standard API might + experience issues + + * While the bug specifically affects SSH, changes to the LFS transfer + code could potentially impact HTTPS transfers if the modifications + aren't properly scoped to SSH-only scenarios. + + * The fix might interact differently with existing git-lfs + configuration options (e.g., `lfs.transfer.maxretries`, custom transfer + agents) that users have set. + + [ Other Info ] + + * This bug affects the Blender Foundation's infrastructure team, which + hosts a Gitea instance at https://projects.blender.org and needs Git LFS + over SSH support for their development workflow. This represents a + concrete use case affecting a major open-source project. + + * Users who have worked around this bug (by using HTTPS instead of SSH) + should be notified that SSH support is now functional. + + * This update only affects git-lfs itself; no changes to git or other + packages are required.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2131243 Title: git-lfs hangs when uploading over ssh To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/git-lfs/+bug/2131243/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
