Failed to health check repository

Hello.

I’ve imported repositories from local Gogs host to gites, upon running
image

I see some annoying warnings in the logs:
2022/04/04 16:06:30 .../repository/check.go:43:func1() [W] Failed to health check repository (&{13 1 Me <nil> myrepo MyRepo My Repository 5 http://git.local/Myepo/MyRepo.git master 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 false false false false <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 373329179 <nil> <nil> true false [] default 13 1648977705 1648977741}): exit status 1 - error: invalid parameter: expected sha1, got ''

How can I set / add / repair this problem?

Bumping, Since all updates from the initial version I’ve set (1.16.xxx) up till the latest 1.18.xxx having the same warning without resolution.

try running gitea doctor to check and repair

Tried it before and right now with no change. All my repositories return the same (warning):

So this is essentially a git fsck

on the host machine, could you navigate to the bare repository in question and run git fsck to see what a RAW git command states

On running git fsck following is received:

But, even if I do the ‘git config --global --add …git’ it is still the same result (I removed it and tried the whole process again to verify).

BTW, what can I do about this error?
Every time I’m trying to clone from this local server, I’m getting this error (is shown on every clone from this server for any user [most of the times, when doing the --add … it is resolved, but it does not look right to me: exec --add for every user in every computer for any repository in my network] – I guess it is something I’ve missed when initial configuration made).

Ahh its the git safety mechanism.
The simplest way is change who owns the repository directory (in fact the entire gitea parent) to the user that gitea runs as.

1 Like
Summary

Tried it right now…

This one did solve it (the annoying safe.directory one) !!

Thank you.

Although this is OT… how can I set https/ssl cloning for my server?