Fatal error on git push


While pushing to git i lost network connection(it was uploading files to lfs).

Now when i try to push i get this error:
Fatal error: Server error: http://server/group/project.git/info/lfs/objects/d4ff4ca7abdd5dae53bb546fac4af4c35d026ef3f116eea412601207fd3e95be

What can be done to fix this error?

check gitea.log file for more detailed error

Logs were empty, but i found the problem.
There was temp file in folder for lfs objects, when i deleted this file push worked without problems.

1 Like

I had the same problem just now:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin master:master
Pushing to ssh://git@server.lan:22/user/repo.git
Locking support detected on remote “origin”. Consider enabling it with:
$ git config lfs.https://server.lan/user/repo.git/info/lfs.locksverify true

Uploading LFS objects: 89% (8/9), 24 MB | 0 B/s, done.
Fatal error: Server error: https://server.lan/user/repo.git/info/lfs/objects/d1ab95cb77debdd31e30dcce653f11e51680c7e4ce814d6ce0abc49e22ea459f
error: failed to push some refs to ‘ssh://git@server.lan:22/user/repo.git’
Completed with errors, see above.

grepping over gitea.log for errors showed this:

4d6ce0abc49e22ea459f.tmp]: Unable to open temporary file for writing: open /data/git/lfs/d1/ab/95cb77debdd31e30dcce653f11e51680c7e4ce814d6ce

0abc49e22ea459f.tmp: file exists Error: %!v(MISSING)

The reason for the leftover .tmp files was probably a timeout because of a slow initial upload of a large dataset. I changed LFS_HTTP_AUTH_EXPIRY to 120m, now it should work.