Skip to content

Instantly share code, notes, and snippets.

@dragonde
Last active June 20, 2022 12:42
Show Gist options
  • Save dragonde/dee36a454f29d77c5361098fbbb4bd20 to your computer and use it in GitHub Desktop.
Save dragonde/dee36a454f29d77c5361098fbbb4bd20 to your computer and use it in GitHub Desktop.
gitlab: fix commit graf

view last repo failed https://git.yexir.com/admin/projects?last_repository_check_failed=1

root@gitlab-yexir:/var/log/gitlab/gitlab-rails# sudo /opt/gitlab/embedded/bin/git -C /var/opt/gitlab/git-data/repositories/@hashed/2c/62/2c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a3.git fsck Checking object directories: 100% (256/256), done. Checking objects: 100% (176419/176419), done. dangling blob ccfcc9f7acbfb9025244e8865d92c71179384ae5 Verifying commits in commit graph: 100% (77/77), done. Verifying commits in commit graph: 100% (507/507), done. Verifying commits in commit graph: 100% (3466/3466), done. error: Could not read 61bea3bf90a871ed9eae27320f99b81768980219 failed to parse commit 61bea3bf90a871ed9eae27320f99b81768980219 from object database for commit-graph Verifying commits in commit graph: 100% (16387/16387), done.

https://docs.gitlab.com/ee/administration/repository_checks.html#:~:text=If%20any%20projects%20fail%20their,last_repository_check_failed%3D1%20.

https://gitlab.com/gitlab-org/gitaly/-/issues/2359

Regenerate commit-graph

sudo /opt/gitlab/embedded/bin/git -C /var/opt/gitlab/git-data/repositories/@hashed/2c/62/2c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a3.git commit-graph write

sudo /opt/gitlab/embedded/bin/git -C /var/opt/gitlab/git-data/repositories/@hashed/2c/62/2c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a3.git fsck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment