Unable to view repository - 500 error page

その他

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Unable to view a repository in Stash and the following appears in the atlassian-stash.log:

2015-01-07 20:48:00,893 ERROR [http-nio-7990-exec-1] kahloun.foong @1C6I1MZx1248x30x0 2mv2j6 0:0:0:0:0:0:0:1 "GET /projects/TST/repos/reponame/browse HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl '/opt/local/bin/git cat-file -t refs/heads/master:' exited with code 128 saying: error: object file ./objects/d2/707a3ade84e9072a3b3e5bdd571fd9093635fe is empty
fatal: loose object d2707a3ade84e9072a3b3e5bdd571fd9093635fe (stored in ./objects/d2/707a3ade84e9072a3b3e5bdd571fd9093635fe) is corrupt
com.atlassian.stash.exception.CommandFailedException: '/opt/local/bin/git cat-file -t refs/heads/master:' exited with code 128 saying: error: object file ./objects/d2/707a3ade84e9072a3b3e5bdd571fd9093635fe is empty
fatal: loose object d2707a3ade84e9072a3b3e5bdd571fd9093635fe (stored in ./objects/d2/707a3ade84e9072a3b3e5bdd571fd9093635fe) is corrupt
	at com.atlassian.stash.scm.DefaultCommandExitHandler.onError(DefaultCommandExitHandler.java:47) ~[DefaultCommandExitHandler.class:na]
	at com.atlassian.stash.scm.git.common.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:104) ~[na:na]
	at com.atlassian.stash.scm.git.common.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:158) ~[na:na]

診断

Check the path to the repository by accessing the Repository Settings page, eg: http://localhost:7990/projects/TST/repos/reponame/settings

Run the following commands to look for the corrupted Git object file in the machine hosting Stash:

cd /path/to/stash/home/shared/data/repositories/<repoID>
git fsck

原因

There is a corrupted Git object in the repository.

ソリューション

  1. Shutdown Stash and replace the corrupted file with the Git object in user local clone (eg: /path/to/local/clone/.git/objects/d2/707a3ade84e9072a3b3e5bdd571fd9093635fe)
    OR
  2. Delete the repository from the Settings page, recreate and push the Git repository from user local clone again (will lose the Pull Request history)
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.