Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-11011

Error "Could not read loose ref" occurs when viewing files on a branch called "config"

    XMLWordPrintable

Details

    Description

      Problem
      When trying to view a file in the Bitbucket Server web UI, an error is thrown saying "An error occurred while executing an external process: Could not read loose ref config" if the file you're trying to view is on a branch called "config".

      Steps to reproduce

      1. In an existing repository with files in it, create a branch called "config" or "Config"
      2. On the left click "Source"
      3. At the top, be sure to switch to the "config" or "Config" branch
      4. Click on any file in the list of files to view it

      Expected result
      The file contents are displayed

      Actual result
      An error is displayed saying "An error occurred while executing an external process: Could not read loose ref config".

      In addition, the logs show the following exception:

      2018-07-24 10:43:41,531 ERROR [http-nio-7990-exec-780] username *OIKMNKx643x60691690x15 4ugm39 1.2.3.4 "GET /projects/PROJ/repos/repo/browse HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl An error occurred while executing an external process: Could not read loose ref config
      com.atlassian.bitbucket.ServerException: An error occurred while executing an external process: Could not read loose ref config
      	at com.atlassian.stash.internal.scm.git.command.refdb.AbstractGitRefDbCommand.call(AbstractGitRefDbCommand.java:54)
      	at com.atlassian.stash.internal.scm.git.command.refdb.ResolveGitRefDbCommand.call(ResolveGitRefDbCommand.java:44)
      	at com.atlassian.stash.internal.scm.git.command.refdb.ResolveGitRefDbCommand.call(ResolveGitRefDbCommand.java:23)
      	at com.atlassian.stash.internal.scm.git.command.TransformedGitCommand.call(TransformedGitCommand.java:45)
      	at com.atlassian.stash.internal.repository.DefaultRefService.resolveRef(DefaultRefService.java:254)
      

      Workaround
      Avoid creating branches whose name is "config".

      Attachments

        Issue Links

          Activity

            People

              khughes@atlassian.com Kristy
              cglockner Christian Glockner
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: