Hi
My server use Apache2 http as the authentication, and I can
clone and push with normal objects, but with the lfs objects, when
push use
git lfs push origin --all
it says:
Check that you have proper access to the repository
Enabled trace when push :
GIT_TRACE=1 GIT_URL_VERBOSE=1 git lfs push origin --all
Part of its log was:
"
13:11:34.060907 trace git-lfs: creds: git credential fill ("http", "gerrit.local", "")
13:11:34.061710 git.c:444 trace: built-in: git credential fill
13:11:34.061821 run-command.c:664 trace: run_command: 'git credential-store get'
13:11:34.063594 git.c:444 trace: built-in: git credential-store get
13:11:34.063953 trace git-lfs: Filled credentials for http://git-...@gerrit.local/a/sandbox
13:11:34.064251 trace git-lfs: HTTP: POST http://git-...@gerrit.local/a/sandbox.git/info/lfs/objects/batch
13:11:34.067210 trace git-lfs: HTTP: 200
13:11:34.067228 trace git-lfs: creds: git credential approve ("http", "gerrit.local", "")
13:11:34.068117 git.c:444 trace: built-in: git credential approve
13:11:34.068251 run-command.c:664 trace: run_command: 'git credential-store store'
13:11:34.069396 git.c:444 trace: built-in: git credential-store store
13:11:34.070006 trace git-lfs: tq: starting transfer adapter "basic"
13:11:34.103359 trace git-lfs: HTTP: 401
Check that you have proper access to the repository
13:11:34.103456 trace git-lfs: tq: enqueue retry #1 after 0.25s for "2d9205f4f882c091ab9e5421e4d3f28d792479d073b1edce12632316b8f93c81" (size: 72786848)
13:11:34.353708 trace git-lfs: tq: sending batch of size 1
13:11:34.353915 trace git-lfs: api: batch 1 files
"
it return the http error 401.
And checking the apaceh2's log:
[Tue Feb 16 13:12:10.182256 2021] [auth_basic:error] [pid 5893:tid 140064948463360] [client
192.168.10.221:59870] AH01614: client used wrong authentication scheme: /plugins/lfs/content/default/2d9205f4f882c091ab9e5421e4d3f28d792479d073b1edce12632316b8f93c81
seems there are two authentication, one is used for clone,push(they are
same with login), one is used for lfs plugin(which come from user-->setting-->http credential?), don't know how to make both of them work.
I have config the lfs plugin as
Part of my gerrit settings:
[auth]
type = HTTP
emailFormat = {0}@gerrit.local
gitBasicAuthPolicy = HTTP
trustContainerAuth = true
[receive]
enableSignedPush = false
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = proxy-http://*:8081/
[cache]
directory = cache
[lfs]
plugin = lfs
Br,
Yingchun