-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Describe the bug
Running git archive HEAD prompt for password to ssh key, but value is not used (passing empty value does not break creating correct archive).
To Reproduce
Unfortunately I cannot provide easy reproduction as this behaviour is observed in my private repository hosted on private instance of Gitea.
$ env -i GIT_TRACE=1 GIT_TRANSFER_TRACE=1 GIT_CURL_VERBOSE=1 GIT_TRACE_PACKET=1 git archive HEAD -v > /dev/null
18:19:50.749791 git.c:460 trace: built-in: git archive HEAD -v
<some files not tracked by lfs>
# first file tracked by lfs
tests/<subpath>/00_cp.activity.rtl
18:19:50.751163 run-command.c:655 trace: run_command: 'git-lfs filter-process'
18:19:50.751753 pkt-line.c:80 packet: git> git-filter-client
18:19:50.751769 pkt-line.c:80 packet: git> version=2
18:19:50.751777 pkt-line.c:80 packet: git> 0000
18:19:50.756928 trace git-lfs: exec: git 'version'
18:19:50.758668 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' '--git-dir' '--show-toplevel'
18:19:50.760098 trace git-lfs: exec: git 'rev-parse' '--is-bare-repository'
18:19:50.761482 trace git-lfs: exec: git 'config' '--includes' '--local' 'lfs.repositoryformatversion'
18:19:50.762903 trace git-lfs: exec: git 'config' '--includes' '-l'
18:19:50.764479 trace git-lfs: exec: git 'rev-parse' '--is-bare-repository'
18:19:50.765840 trace git-lfs: exec: git 'config' '--includes' '-l' '--blob' ':.lfsconfig'
18:19:50.767486 trace git-lfs: exec: git 'config' '--includes' '-l' '--blob' 'HEAD:.lfsconfig'
18:19:50.768460 trace git-lfs: Install hook: pre-push, force=false, path=/tmp/fuse2/.git/hooks/pre-push, upgrading...
18:19:50.768529 trace git-lfs: Install hook: post-checkout, force=false, path=/tmp/fuse2/.git/hooks/post-checkout, upgrading...
18:19:50.768576 trace git-lfs: Install hook: post-commit, force=false, path=/tmp/fuse2/.git/hooks/post-commit, upgrading...
18:19:50.768634 trace git-lfs: Install hook: post-merge, force=false, path=/tmp/fuse2/.git/hooks/post-merge, upgrading...
18:19:50.768674 trace git-lfs: Initialize filter-process
18:19:50.768741 pkt-line.c:80 packet: git< git-filter-server
18:19:50.768759 pkt-line.c:80 packet: git< version=2
18:19:50.768766 pkt-line.c:80 packet: git< 0000
18:19:50.768773 pkt-line.c:80 packet: git> capability=clean
18:19:50.768784 pkt-line.c:80 packet: git> capability=smudge
18:19:50.768790 pkt-line.c:80 packet: git> capability=delay
18:19:50.768794 pkt-line.c:80 packet: git> 0000
18:19:50.768833 pkt-line.c:80 packet: git< capability=clean
18:19:50.768840 pkt-line.c:80 packet: git< capability=smudge
18:19:50.768845 pkt-line.c:80 packet: git< capability=delay
18:19:50.768851 pkt-line.c:80 packet: git< 0000
18:19:50.768858 pkt-line.c:80 packet: git> command=smudge
18:19:50.768868 pkt-line.c:80 packet: git> pathname=tests/<path>/00_cp.activity.rtl
18:19:50.768875 pkt-line.c:80 packet: git> ref=refs/heads/master
18:19:50.768883 pkt-line.c:80 packet: git> treeish=0fa3b9b5260f5c083d50380dbfa80eaad3be2146
18:19:50.768889 pkt-line.c:80 packet: git> blob=8df0b748d851385eea16e3ae5e65b494344c49fe
18:19:50.768894 pkt-line.c:80 packet: git> 0000
18:19:50.768901 pkt-line.c:80 packet: git> version https://git-lfs.github.com/spec/v1oid sha256:80e6c3d33b40d89632879c990f9e0cd9b8d31e1ba3d2c2c4446313415ab36459size 540292
18:19:50.768907 pkt-line.c:80 packet: git> 0000
18:19:50.768989 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' 'HEAD' '--symbolic-full-name' 'HEAD'
18:19:50.769902 trace git-lfs: attempting pure SSH protocol connection
18:19:50.770040 trace git-lfs: run_command: ssh -oControlMaster=auto -oControlPath=/tmp/sock-2718973816/sock-%C git@gitea.local git-lfs-transfer Overnight/fuseCookieSoftware.git download
18:19:50.770108 trace git-lfs: exec: ssh '-oControlMaster=auto' '-oControlPath=/tmp/sock-2718973816/sock-%C' 'git@gitea.local' 'git-lfs-transfer Overnight/fuseCookieSoftware.git download'
Enter passphrase for key '/home/astachlewski/.ssh/id_rsa':
18:19:54.115699 trace git-lfs: pure SSH protocol connection failed: Unable to negotiate version with remote side (unable to read capabilities): EOF
18:19:54.115963 trace git-lfs: tq: running as batched queue, batch size of 100
18:19:54.116054 pkt-line.c:80 packet: git< status=success
18:19:54.116080 trace git-lfs: filepathfilter: accepting "tests/<path>/00_cp.activity.rtl"
Expected behavior
git archive should not ask for password to key.
System environment
- Ubuntu 22
- git version 2.39.2
- git-lfs/3.3.0 (GitHub; linux amd64; go 1.19.3) (I've also tried default Ubuntu 22 versions for git and git-lfs)
Output of git lfs env
git-lfs/3.3.0 (GitHub; linux amd64; go 1.19.3)
git version 2.39.2
Endpoint=https://<gitea.local>/org/fuse2.git/info/lfs (auth=none)
SSH=git@<gitea.local>:org/fuse2.git
LocalWorkingDir=/tmp/fuse2
LocalGitDir=/tmp/fuse2/.git
LocalGitStorageDir=/tmp/fuse2/.git
LocalMediaDir=/tmp/fuse2/.git/lfs/objects
LocalReferenceDirs=
TempDir=/tmp/fuse2/.git/lfs/tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=/tmp/fuse2/.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 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"
Additional context
git archive is used by setuptools_scm to provide list of files to include in sdist when building python package. Building package in isolated environment requires passing password (or at least empty value) as ssh agent is not available.
Reactions are currently unavailable