I noticed that git lfs operations (push or pull but especially push) with GitHub keep getting stuck running git-lfs-transfer. This is slowing down all of my git operations which call git lfs via hooks.
Here's an example (I just found a public repo with an lfs file):
git clone [email protected]:cbeams/lfs-test.git
cd lfs-test
GIT_TRACE=1 GIT_TRACE_CURL=1 git lfs pull
this often hangs at this step:
15:20:53.004384 trace git-lfs: exec: ssh '-oControlMaster=yes' '-oControlPath=/run/user/1000/sock-881286357/lfs.sock' '[email protected]' 'git-lfs-transfer cbeams/lfs-test.git download'
Sometimes it succeeds quickly, sometimes after a very long time. If I Ctrl+C and cancel the command out of impatience, then all authentication to GitHub fails for a while:
$ ssh -v [email protected]
OpenSSH_8.9p1 Ubuntu-3ubuntu0.13, OpenSSL 3.0.2 15 Mar 2022
...
debug1: Connecting to github.com [140.82.114.3] port 22.
Additionally, running the git-lfs-transfer shown in the above stuck line results in:
$ ssh [email protected] 'git-lfs-transfer Apress/repo-with-large-file-storage.git download'
Invalid command: git-lfs-transfer Apress/repo-with-large-file-storage.git download
You appear to be using ssh to clone a git:// URL.
Make sure your core.gitProxy config option and the
GIT_PROXY_COMMAND environment variable are NOT set.
git lfs pull seems to pull the file anyway despite that error which is confusing.
Here are my versions:
$ git-lfs --version
git-lfs/3.7.1 (GitHub; linux amd64; go 1.24.4)
$ git --version
git version 2.34.1
sshstarted bygit lfswith optionControlMaster=yesis still running; authentication fails until runningsshtimed out. To stop it tryssh -O exit [email protected].sshneeds ControlPath when doing-O exit. But as far as I can tell, the connection doesn't start. The control socket path in/run/user/1000/sock-...doesn't get created.