Skip to content

Pure SSH hangs with LFS upload after Idle timeout #34834

Closed
@Dervz

Description

@Dervz

Description

I run a local instance of GItea as VSC.

When i upload files to LFS with PURE SSH on - i always get an error as you can see on screenshot, which is related to the connection being "idle" for 1 minute. Is it a timeout somewhere in git-lfs lib for ssh connection? Is it intended and if so is it configurable?

As i investigated, it is not related to the size of files being pushed. For example if i add a sleep pause in my endpoint or pause there with a debugger for 1 minute, then transfer will be forced to close immidiately.

No proxies. Error occurres regardless of where LFS is based. For example, it can be minio (either local with docker compose or on the server) and even
when lfs is a local folder!!!!!!!!! (so it is not a backend -> minio connection issue)

Image
Image

To Reproduce
Steps to reproduce the behavior:

PURE SSH enabled
Track LFS large object
Push it with SSH
See error
Expected behavior
A successful push to LFS with SSH without an interrupt after a minute

System environment

$ git config -l
diff.astextplain.textconv=astextplain
http.sslbackend=schannel
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
core.editor=code --wait
core.sshcommand=cat - | C:/Windows/System32/OpenSSH/ssh.exe
[email protected]
user.name=PavelNevmovenko

http.sslbakcend=schannel
http.sslbackend=schannel
http.sslverify=false
credential.https://sberworks.ru.provider=generic
credential.http://localhost:3000.provider=generic
credential.https://gitverse.ru.provider=generic
url.ssh://[email protected]:7998.insteadof=https://sberworks.ru/bitbucket-ci/scm
lfs.concurrenttransfers=10
lfs.activitytimeout=300
lfs.dialtimeout=120
lfs.keepalive=3600
lfs.tlstimeout=120
http.postbuffer=624288000
lfs.ssh.automultiplex=false
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=nevmo@localhost:panevmovenko/ooooooo.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main
lfs.repositoryformatversion=0
lfs.contenttype=false

PROXY is NOT used.

Output of git lfs env

`$ git lfs env
git-lfs/3.6.1 (GitHub; windows amd64; go 1.23.3; git ea47a34b)
git version 2.50.0.windows.1

Endpoint=https://localhost/panevmovenko/ooooooo.git/info/lfs (auth=none)
  SSH=nevmo@localhost:panevmovenko/ooooooo.git
LocalWorkingDir=D:\gtiverse\lfs-s3-bug\ooooooo
LocalGitDir=D:\gtiverse\lfs-s3-bug\ooooooo\.git
LocalGitStorageDir=D:\gtiverse\lfs-s3-bug\ooooooo\.git
LocalMediaDir=D:\gtiverse\lfs-s3-bug\ooooooo\.git\lfs\objects
LocalReferenceDirs=
TempDir=D:\gtiverse\lfs-s3-bug\ooooooo\.git\lfs\tmp
ConcurrentTransfers=10
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneVerifyUnreachableAlways=false
PruneRemoteName=origin
LfsStorageDir=D:\gtiverse\lfs-s3-bug\ooooooo\.git\lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file,ssh
UploadTransfers=basic,lfs-standalone-file,ssh
GIT_EXEC_PATH=C:/Program Files/Git/mingw64/libexec/git-core
GIT_LFS_PATH=C:\Program Files\Git LFS
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
`

also, this is my config for ssh

`Host *
ServerAliveInterval 30
TCPKeepAlive yes

Gitea Version

v1.24

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

2.50.0

Operating System

MacOS / Windows / Linux mint

How are you running Gitea?

Local insantance launches in goland
OR
Docker compose

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions