Git Checkout with LFS: Project not found or inaccessible (OD-2612)
Sebastian opened 1 month ago

Hi,

since our update to 13.1.1, git-lfs fails in the checkout-step of our build pipeline:

10:45:52 Pending resource allocation...
10:45:52 Executing job (executor: docker-cpp, agent: agent-1)...
10:45:52 Creating docker network 'docker-cpp-1-1165-2'...
10:45:52 Downloading job dependencies...
10:45:53 Running step "Checkout"...
10:45:53 Checking out code...
10:45:54 Updated Git hooks.
10:45:54 Git LFS initialized.
10:45:55 Downloading mypath/image.tif (31 KB)
10:45:55 Error downloading object: mypath/image.tif (d4ae767): Smudge error: Error downloading mypath/image.tif (d4ae7679e2c1239633a3cf6f9ad629d287fe402249c53422bcbd7f433e2213d0): batch response: Project not found or inaccessible: MyProject.git
10:45:55 
10:45:55 Errors logged to '/home/onedev/agent/work/temp/onedev-build-1-1165-2/workspace/.git/lfs/logs/20251127T104555.018851112.log'.
10:45:55 Use `git lfs logs last` to view the log.
10:45:55 Error: external filter 'git-lfs filter-process' failed
10:45:55 Criticial: mypath/image.tif: smudge-Filter 'lfs' failed
10:45:55 Command execution failed (command: git -c "core.sshCommand=ssh -i "/home/onedev/agent/work/temp/onedev-build-1-1165-2/user/.ssh/id_rsa" -o UserKnownHostsFile="/home/onedev/agent/work/temp/onedev-build-1-1165-2/user/.ssh/known_hosts" -F /dev/null" checkout --quiet 7cebe59d1d589bb7e304c03dad0086be04daa817, exit code: 128)

(some of these messages were translated)

The relevant checkout config:

  - type: CheckoutStep
    name: Checkout
    cloneCredential:
      type: SshCredential
      keySecret: ssh_key
    withLfs: true
    withSubmodules: false
    condition: SUCCESSFUL
    optional: false

ssh_key is set and valid. Git LFS appears to work on local checkouts, and seems to fail only during the build step.

The mentioned log file can be accessed by rapidly spamming cat-commands on the shell and contains:

git-lfs/3.6.1 (GitHub; linux amd64; go 1.24.4)
git version 2.47.3

$ git-lfs filter-process
Error downloading object: mypath/image.tif (d4ae767): Smudge error: Error downloading mypath/image.tif (d4ae7679e2c1239633a3cf6f9ad629d287fe402249c53422bcbd7f433e2213d0): batch response: Project not found or inaccessible: MyProject.git

Project not found or inaccessible: MyProject.git
batch response
github.com/git-lfs/git-lfs/errors.newWrappedError
        github.com/git-lfs/git-lfs/errors/types.go:229
github.com/git-lfs/git-lfs/errors.Wrap
        github.com/git-lfs/git-lfs/errors/errors.go:74
github.com/git-lfs/git-lfs/tq.(*tqClient).Batch
        github.com/git-lfs/git-lfs/tq/api.go:97
github.com/git-lfs/git-lfs/tq.Batch
        github.com/git-lfs/git-lfs/tq/api.go:45
github.com/git-lfs/git-lfs/tq.(*TransferQueue).enqueueAndCollectRetriesFor
        github.com/git-lfs/git-lfs/tq/transfer_queue.go:581
github.com/git-lfs/git-lfs/tq.(*TransferQueue).collectBatches.func1
        github.com/git-lfs/git-lfs/tq/transfer_queue.go:470
runtime.goexit
        runtime/asm_amd64.s:1700
Error downloading mypath/image.tif (d4ae7679e2c1239633a3cf6f9ad629d287fe402249c53422bcbd7f433e2213d0)
github.com/git-lfs/git-lfs/errors.newWrappedError
        github.com/git-lfs/git-lfs/errors/types.go:229
github.com/git-lfs/git-lfs/errors.Wrapf
        github.com/git-lfs/git-lfs/errors/errors.go:85
github.com/git-lfs/git-lfs/lfs.(*GitFilter).downloadFile
        github.com/git-lfs/git-lfs/lfs/gitfilter_smudge.go:135
github.com/git-lfs/git-lfs/lfs.(*GitFilter).Smudge
        github.com/git-lfs/git-lfs/lfs/gitfilter_smudge.go:85
github.com/git-lfs/git-lfs/commands.smudge
        github.com/git-lfs/git-lfs/commands/command_smudge.go:128
github.com/git-lfs/git-lfs/commands.filterCommand
        github.com/git-lfs/git-lfs/commands/command_filter_process.go:132
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra/command.go:989
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra/command.go:1117
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra/command.go:1041
github.com/git-lfs/git-lfs/commands.Run
        github.com/git-lfs/git-lfs/commands/run.go:154
main.main
        github.com/git-lfs/git-lfs/git-lfs.go:34
runtime.main
        runtime/proc.go:283
runtime.goexit
        runtime/asm_amd64.s:1700
Smudge error
github.com/git-lfs/git-lfs/errors.newWrappedError
        github.com/git-lfs/git-lfs/errors/types.go:229
github.com/git-lfs/git-lfs/errors.NewSmudgeError
        github.com/git-lfs/git-lfs/errors/types.go:315
github.com/git-lfs/git-lfs/lfs.(*GitFilter).Smudge
        github.com/git-lfs/git-lfs/lfs/gitfilter_smudge.go:102
github.com/git-lfs/git-lfs/commands.smudge
        github.com/git-lfs/git-lfs/commands/command_smudge.go:128
github.com/git-lfs/git-lfs/commands.filterCommand
        github.com/git-lfs/git-lfs/commands/command_filter_process.go:132
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra/command.go:989
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra/command.go:1117
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra/command.go:1041
github.com/git-lfs/git-lfs/commands.Run
        github.com/git-lfs/git-lfs/commands/run.go:154
main.main
        github.com/git-lfs/git-lfs/git-lfs.go:34
runtime.main
        runtime/proc.go:283
runtime.goexit
        runtime/asm_amd64.s:1700

Current time in UTC:
2025-11-27 10:59:14

Environment:
LocalWorkingDir=/home/onedev/agent/work/temp/onedev-build-1-1165-7/workspace
LocalGitDir=/home/onedev/agent/work/temp/onedev-build-1-1165-7/workspace/.git
LocalGitStorageDir=/home/onedev/agent/work/temp/onedev-build-1-1165-7/workspace/.git
LocalMediaDir=/home/onedev/agent/work/temp/onedev-build-1-1165-7/workspace/.git/lfs/objects
LocalReferenceDirs=
TempDir=/home/onedev/agent/work/temp/onedev-build-1-1165-7/workspace/.git/lfs/tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneVerifyUnreachableAlways=false
PruneRemoteName=origin
LfsStorageDir=/home/onedev/agent/work/temp/onedev-build-1-1165-7/workspace/.git/lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file,ssh
UploadTransfers=basic,lfs-standalone-file,ssh
GIT_EXEC_PATH=/usr/lib/git-core
GIT_PREFIX=
GIT_CONFIG_PARAMETERS='core.sshCommand'='ssh -i "/home/onedev/agent/work/temp/onedev-build-1-1165-7/user/.ssh/id_rsa" -o UserKnownHostsFile="/home/onedev/agent/work/temp/onedev-build-1-1165-7/user/.ssh/known_hosts" -F /dev/null'

Client IP addresses:
[...]

Any ideas?

Thanks, Sebastian

  • OneDev commented 1 month ago

    State changed as code fixing the issue is committed (3b0de1e0)

  • OneDev changed state to 'Closed' 1 month ago
    Previous Value Current Value
    Open
    Closed
  • OneDev commented 1 month ago

    State changed as build OD-6820 (13.1.2) is successful

  • OneDev changed state to 'Released' 1 month ago
    Previous Value Current Value
    Closed
    Released
  • Sebastian commented 1 month ago

    Thanks again for that (extremly fast) fix! 😃

  • Robin Shen commented 1 month ago

    No problem. Thanks for reporting the issue!

issue 1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
13.1.1
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2612
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover