Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"An error occurred" when I want to access a new repo #27389

Closed
MrVrops opened this issue Oct 2, 2023 · 4 comments · Fixed by #27393
Closed

"An error occurred" when I want to access a new repo #27389

MrVrops opened this issue Oct 2, 2023 · 4 comments · Fixed by #27393
Labels

Comments

@MrVrops
Copy link

MrVrops commented Oct 2, 2023

Description

Hello everyone,

The existing repos in my Gitea instance work well.

However, when I try to create a new repo, I can do it but when I try to access it I encounter the following error:
An error occurred
The Git data underlying this repository cannot be read. Contact the administrator of this instance or delete this repository.

When I go into my log file, I come across these lines when I refresh the page on this new repo:
2023/10/02 09:17:05 ...ers/web/repo/view.go:890:renderCode() [E] GitRepo.IsEmpty: check empty: exit status 129 - usage: git rev-list [OPTION] <commit-id>... [ -- paths... ] limiting output: --max-count=<n> --max-age=<epoch> --min-age=<epoch> --sparse --no-merges --min-parents=<n> --no-min-parents --max-parents=<n> --no-max-parents --remove-empty --all --branches --tags --remotes --stdin --quiet ordering output: --topo-order --date-order --reverse formatting output: --parents --children --objects | --objects-edge --unpacked --header | --pretty --abbrev=<n> | --no-abbrev --abbrev-commit --left-right --count special purpose: --bisect --bisect-vars --bisect-all 2023/10/02 09:17:05 ...eb/routing/logger.go:102:func1() [I] router: completed GET /Cloud/Test for SECRET-IP:0, 200 OK in 31.1ms @ repo/view.go:711(repo.Home)

Have you ever seen a similar case? If so, can you help me?

Thank you for your help.

Gitea Version

1.20.4

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Capture

Git Version

2.11.0

Operating System

Debian 9

How are you running Gitea?

Installation from binary.

Database

MySQL/MariaDB

@wxiaoguang
Copy link
Contributor

Related to #26517

You can update your "git" package to a newer version.

@MrVrops
Copy link
Author

MrVrops commented Oct 2, 2023

Thank you for your reply

I'm stuck at git 2.11.0 with Debian 9, if I install git via source I won't encounter compatibility problems?

Thanks for all

@wxiaoguang
Copy link
Contributor

Or you could try to downgrade Gitea to 1.20.2 which doesn't contain that fix.

It's safe to directly downgrade to 1.20.x

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Oct 2, 2023

Or you could try to build your own binary with "Fix git 2.11 error when checking IsEmpty 27393", or wait for its backport to 1.20.5

Update: the complete fix should be "Fix git 2.11 error when checking IsEmpty again #27399", sorry that I made a mistake in 27393

GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Oct 2, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Oct 2, 2023
lunny pushed a commit that referenced this issue Oct 2, 2023
Backport #27393 by @wxiaoguang

Fix #27389

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
silverwind pushed a commit that referenced this issue Oct 2, 2023
Backport #27393 by @wxiaoguang

Fix #27389

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants