Error 500 when loading empty repository #8426

Closed
opened 2025-11-02 08:05:32 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @grisu48 on GitHub (Jan 30, 2022).

Gitea Version

1.16.0+rc1

Git Version

2.30.2

Operating System

openSUSE Leap 15.3

How are you running Gitea?

I'm running gitea:latest as a podman container

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/grisu48/fe729f43fea4735235ea772733ee5d53

Description

When creating a new empty repository, gitea results in a 500 error and I see the following in the log

2022/01/30 11:07:32 Started GET /phoenix/labenvmon for 10.88.0.1:54964
2022/01/30 11:07:32 ...ers/web/repo/view.go:860:renderCode() [E] GitRepo.IsEmpty: check empty: exit status 128 - fatal: your current branch 'main' does not have any commits yet

2022/01/30 11:07:32 Completed GET /phoenix/labenvmon 500 Internal Server Error in 62.831049ms

Screenshots

Screenshot 2022-01-30 at 12-13-41 labenvmon

Originally created by @grisu48 on GitHub (Jan 30, 2022). ### Gitea Version 1.16.0+rc1 ### Git Version 2.30.2 ### Operating System openSUSE Leap 15.3 ### How are you running Gitea? I'm running `gitea:latest` as a podman container ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/grisu48/fe729f43fea4735235ea772733ee5d53 ### Description When creating a new empty repository, gitea results in a 500 error and I see the following in the log 2022/01/30 11:07:32 Started GET /phoenix/labenvmon for 10.88.0.1:54964 2022/01/30 11:07:32 ...ers/web/repo/view.go:860:renderCode() [E] GitRepo.IsEmpty: check empty: exit status 128 - fatal: your current branch 'main' does not have any commits yet 2022/01/30 11:07:32 Completed GET /phoenix/labenvmon 500 Internal Server Error in 62.831049ms ### Screenshots ![Screenshot 2022-01-30 at 12-13-41 labenvmon](https://user-images.githubusercontent.com/1527829/151697233-d74af498-0db5-4ab9-97d7-e5e546d63cc6.png)
GiteaMirror added the issue/duplicate label 2025-11-02 08:05:32 -06:00
Author
Owner

@Gusted commented on GitHub (Jan 30, 2022):

Sounds like a duplicate of #18413

@Gusted commented on GitHub (Jan 30, 2022): Sounds like a duplicate of #18413
Author
Owner

@zeripath commented on GitHub (Jan 30, 2022):

Yup already fixed and will be in rc2

@zeripath commented on GitHub (Jan 30, 2022): Yup already fixed and will be in rc2
Author
Owner

@grisu48 commented on GitHub (Jan 31, 2022):

Perfect, thank you for fixing this 👍

@grisu48 commented on GitHub (Jan 31, 2022): Perfect, thank you for fixing this :+1:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8426