LFS: Authorization error

1,228 views
Skip to first unread message

cdesai

unread,
May 20, 2022, 7:06:58 AM5/20/22
to Repo and Gerrit Discussion
I'm trying to setup LFS with Gerrit and I'm not able to push

Pushing as the admin user so access shouldn't be an issue.

$ git push gerrit HEAD:refs/for/branch
Locking support detected on remote "gerrit". Consider enabling it with:
Check that you have proper access to the repository
Uploading LFS objects:  83% (5/6), 2.7 MB | 567 KB/s, done.
error: failed to push some refs to 'ssh://gerrit:29418/repo'

$ git remote get-url gerrit
ssh://user@gerrit:29418/repo

Gerrit 3.5.1
git-lfs/3.1.4 (GitHub; linux amd64; go 1.18.1)
lfs plugin 1f4c4127e7

Both SSH and authenticated HTTP pushes fail.

gerrit.config:
[lfs]
     plugin = lfs

All-Projects lfs.config:
[lfs "?/*"]
        enabled = true
        maxObjectSize = 500m


Any ideas?

I don't see anything in either nginx logs or gerrit logs when this failure happens.

Pushing other non-lfs commits to the same repo has worked just fine.

cdesai

unread,
May 20, 2022, 7:20:23 AM5/20/22
to Repo and Gerrit Discussion
I've also tried

etc/lfs.config
[auth]
    sshExpirationSeconds = 600

cdesai

unread,
May 23, 2022, 4:38:46 PM5/23/22
to Repo and Gerrit Discussion
I tried to play around with this a bit more:

1. bumped sshExpirationSeconds to 6000, didn't help
     Verified timeout has been bumped using
     ssh gerrit git-lfs-authenticate repo download # And then checking the expires values

     git-lfs/3.1.4 (GitHub; linux amd64; go 1.18.1)
2. Copied the repo to a normal linux user on the gerrit server manually (archive + scp), and then pushed from there (to take the network out of the picture)
     That worked, however the server has an older version of git lfs
     git-lfs/2.7.1 (GitHub; linux amd64; go 1.11.6)
3. Tried it from another server (same datacenter), that worked too.
     git-lfs/2.13.1 (GitHub; linux amd64; go 1.14)
4. Tried using the same versions locally, compiling from tags
     git-lfs/2.7.1 wouldn't run
     git-lfs/2.13.1 worked locally once but not reliably

I've also noticed that it always fail when uploading the last (or last few) LFS objects, which are the biggest size wise (~50MB or more)
Smaller objects get uploaded fine, so it might be hitting a timeout somewhere.
Reply all
Reply to author
Forward
0 new messages