1

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
3
  • "If I Ctrl+C and cancel the command out of impatience, then all authentication to GitHub fails for a while" I suspect it's because ssh started by git lfs with option ControlMaster=yes is still running; authentication fails until running ssh timed out. To stop it try ssh -O exit [email protected] . Commented Nov 11 at 6:38
  • 1
    2.34.1 is 4 years old, the latest version is 2.52.0. I would be really surprised if there has not been updates to the lfs functionality in those 4 years. Commented Nov 11 at 8:11
  • 1
    @phd ssh needs 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. Commented Nov 14 at 17:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.