the page show 500 error when I open my repository #5311

Closed
opened 2025-11-02 06:21:10 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @stepm2 on GitHub (Apr 26, 2020).

  • Gitea version (or commit ref):
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

logfile:
..ules/context/repo.go:605:func1() [E] GetBranchCommit: object not found

system notices:
Failed to health check repository (/home/ubuntu/tp/gitea/repositories/tom/jerry.web.git): exit status 2 - error: refs/heads/master: invalid sha1 pointer 0465a55c16418068b7e8100832b045db6dee5d06 error: HEAD: invalid sha1 pointer 0465a55c16418068b7e8100832b045db6dee5d06 notice: No default references

Screenshots

Originally created by @stepm2 on GitHub (Apr 26, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description logfile: ..ules/context/repo.go:605:func1() [E] GetBranchCommit: object not found system notices: Failed to health check repository (/home/ubuntu/tp/gitea/repositories/tom/jerry.web.git): exit status 2 - error: refs/heads/master: invalid sha1 pointer 0465a55c16418068b7e8100832b045db6dee5d06 error: HEAD: invalid sha1 pointer 0465a55c16418068b7e8100832b045db6dee5d06 notice: No default references ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/not-a-bug label 2025-11-02 06:21:10 -06:00
Author
Owner

@stepm2 commented on GitHub (Apr 26, 2020):

I execute the gc,return(Application Version: 1.9.5):
exec(21:Repository garbage collection) failed: exit status 128() stdout: stderr: error: refs/heads/master does not point to a valid object! error: refs/heads/master does not point to a valid object! fatal: bad object HEAD fatal: failed to run repack : error: refs/heads/master does not point to a valid object! error: refs/heads/master does not point to a valid object! fatal: bad object HEAD fatal: failed to run repack

@stepm2 commented on GitHub (Apr 26, 2020): I execute the gc,return(Application Version: 1.9.5): exec(21:Repository garbage collection) failed: exit status 128() stdout: stderr: error: refs/heads/master does not point to a valid object! error: refs/heads/master does not point to a valid object! fatal: bad object HEAD fatal: failed to run repack : error: refs/heads/master does not point to a valid object! error: refs/heads/master does not point to a valid object! fatal: bad object HEAD fatal: failed to run repack
Author
Owner

@guillep2k commented on GitHub (Apr 26, 2020):

Have you moved your repositories? Check if the files are still there... 😰

@guillep2k commented on GitHub (Apr 26, 2020): Have you moved your repositories? Check if the files are still there... 😰
Author
Owner

@6543 commented on GitHub (Apr 26, 2020):

@stepm2 do you have changed the location where repository files are stored in your config?

or did you move this directory

@6543 commented on GitHub (Apr 26, 2020): @stepm2 do you have changed the location where repository files are stored in your config? or did you move this directory
Author
Owner

@zeripath commented on GitHub (Apr 26, 2020):

It looks like the repository on the filesystem has been corrupted. Are your disks fine? Have you had any unexpected shutdowns recently?

You should try going to a command line and try git gc in the git repository that Gitea uses. You could try pushing from a working copy again.

Please also note Gitea 1.9.5 is now quite old. We're undergoing quite rapid development and there have been several security bugs fixed since then.

@zeripath commented on GitHub (Apr 26, 2020): It looks like the repository on the filesystem has been corrupted. Are your disks fine? Have you had any unexpected shutdowns recently? You should try going to a command line and try `git gc` in the git repository that Gitea uses. You could try pushing from a working copy again. Please also note Gitea 1.9.5 is now quite old. We're undergoing quite rapid development and there have been several security bugs fixed since then.
Author
Owner

@stepm2 commented on GitHub (Apr 27, 2020):

It looks like the repository on the filesystem has been corrupted. Are your disks fine? Have you had any unexpected shutdowns recently?

You should try going to a command line and try git gc in the git repository that Gitea uses. You could try pushing from a working copy again.

Please also note Gitea 1.9.5 is now quite old. We're undergoing quite rapid development and there have been several security bugs fixed since then.

I did have an abnormal shutdown before, and I tried to use the git gc command, but returned the following message:

error: refs/heads/master does not point to a valid object!
error: refs/heads/master does not point to a valid object!
fatal: bad object HEAD
fatal: failed to run repack

@stepm2 commented on GitHub (Apr 27, 2020): > It looks like the repository on the filesystem has been corrupted. Are your disks fine? Have you had any unexpected shutdowns recently? > > You should try going to a command line and try `git gc` in the git repository that Gitea uses. You could try pushing from a working copy again. > > Please also note Gitea 1.9.5 is now quite old. We're undergoing quite rapid development and there have been several security bugs fixed since then. I did have an abnormal shutdown before, and I tried to use the `git gc` command, but returned the following message: > error: refs/heads/master does not point to a valid object! > error: refs/heads/master does not point to a valid object! > fatal: bad object HEAD > fatal: failed to run repack
Author
Owner

@6543 commented on GitHub (Apr 27, 2020):

this looks like the data broke on this abnormal shutdown :(

I hope you have a backup of it ( do you have some local repo closen) ?

@6543 commented on GitHub (Apr 27, 2020): this looks like the data broke on this abnormal shutdown :( I hope you have a backup of it ( do you have some local repo closen) ?
Author
Owner

@stepm2 commented on GitHub (Apr 28, 2020):

Probably, I have a local backup, but I still want to find before history, thank you so much.

@stepm2 commented on GitHub (Apr 28, 2020): Probably, I have a local backup, but I still want to find before history, thank you so much.
Author
Owner

@guillep2k commented on GitHub (Apr 28, 2020):

Best of lucks!

@guillep2k commented on GitHub (Apr 28, 2020): Best of lucks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5311