Detached heads are not currently supported

お困りですか?

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

コミュニティに質問

問題

Unable to access the repository.

atlassian-bitbucket.log に次のメッセージが表示される。

2013-10-09 09:41:04,642 ERROR [http-bio-7990-exec-8] sdh 581x6964x1 ob79br 192.168.3.62 "GET /projects/TST/repos/reponame/browse HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl Detached heads are not currently supported. Please ensure the HEAD for BMS-Utils (2) is a reference
com.atlassian.bitbucket.scm.git.DetachedHeadException: Detached heads are not currently supported. Please ensure the HEAD for reponame (2) is a reference
	at com.atlassian.bitbucket.internal.scm.git.RawGitAgent.getHead(RawGitAgent.java:258) ~[na:na]
	at com.atlassian.bitbucket.internal.scm.git.RawGitAgent.resolveHead(RawGitAgent.java:310) ~[na:na]
	at com.atlassian.bitbucket.internal.scm.git.DefaultGitCommandFactory$1.call(DefaultGitCommandFactory.java:202) ~[na:na]

原因

Detached heads are not currently supported.

ソリューション

  1. Check the repository ID:

    SELECT id FROM repository WHERE name='<reponame>';
  2. Go to the directory where Bitbucket Server repository data is located, e.g.:

    cd BITBUCKET_HOME/shared/data/repositories/<ID>
  3. Run the following command to see the content of the file HEAD:

     cat HEAD

    If it return a commit hash (e.g.: 682408a83a7bb1bd6a1ff9695c68272bf3627f74), your repository is in detached HEAD state.

  4. Run the following command to set it back to master branch or any other default branch:

     git symbolic-ref HEAD refs/heads/master

Last modified on Mar 9, 2017

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

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