go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.87k stars 5.47k forks source link

[SOLVED] Server Error 500 after creating a repo via web gui and try to access it via web gui #19551

Closed Jefunne closed 2 years ago

Jefunne commented 2 years ago

Description

Hello community.

after creating a repo via the web gui I got server error 500 when I want to access the repo via the gui. Also after creation the web gui does not automatically switch to the new created repo as in the demo system. gitea_error_500_2.txt

When I check the file system the repo is created.

root@abhean:/var/db/gitea/gitea-repositories/gitea/spiritlog.git # ls -la total 40 drwxr-xr-x 7 git wheel 512 Apr 27 14:21 . drwxr-xr-x 3 git wheel 512 Apr 27 14:21 .. -rw-r--r-- 1 git wheel 23 Apr 27 14:21 HEAD drwxr-xr-x 2 git wheel 512 Apr 27 14:21 branches -rw-r--r-- 1 git wheel 66 Apr 27 14:21 config -rw-r--r-- 1 git wheel 73 Apr 27 14:21 description -rw-r--r-- 1 git wheel 0 Apr 27 14:21 git-daemon-export-ok drwxr-xr-x 6 git wheel 1024 Apr 27 14:21 hooks drwxr-xr-x 2 git wheel 512 Apr 27 14:21 info drwxr-xr-x 8 git wheel 512 Apr 27 14:21 objects drwxr-xr-x 4 git wheel 512 Apr 27 14:21 refs

My environment

I have changed the logging to debug. Here I can see: 2022/04/27 15:02:50 ...dules/git/command.go:143:RunWithContext() [D] /var/db/gitea/gitea-repositories/gitea/spiritlog.git: /usr/local/bin/git -c credential.helper= -c p rotocol.version=2 -c uploadpack.allowfilter=true cat-file --batch-check 2022/04/27 15:02:50 ...ules/context/repo.go:624:RepoAssignment() [E] GetTags: exit status 1 - warning: core.fsyncObjectFiles is deprecated; use core.fsync instead

2022/04/27 15:02:50 ...s/context/context.go:204:HTML() [D] Template: status/500 2022/04/27 15:02:50 ...dels/notification.go:741:GetNotificationCount() [I] [SQL] SELECT count(*) FROM "notification" WHERE (user_id = $1) AND (status = $2) [1 1] - 288. 771µs

Maybe this deprecated part is the root cause.

I had try to report this via the forum. I saw later that it is better to report bugs here.

Best regards

--Christian

Gitea Version

1.16.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.36.0

Operating System

FreeBSD 13

How are you running Gitea?

I installed Gitea via pkg as described in the Gite documentation.

pkg info ... gitea-1.16.5_1 Compact self-hosted Git service

Database

PostgreSQL

wxiaoguang commented 2 years ago

core.fsyncObjectFiles is not in Gitea codebase. Please check your local git config.

https://github.com/go-gitea/gitea/search?q=fsyncObjectFiles&type=code

Jefunne commented 2 years ago

@wxiaoguang Many thanks for your feedback.

I had tried GitLab before but this was not working properly.

I deleted the git user and reinstalled gitea new. Now it is working :-)

It seems that there was something inside the git home directory /usr/local/git.

I will close this with this comment.