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
- In an existing repository with files in it, create a branch called "config" or "Config"
- On the left click "Source"
- At the top, be sure to switch to the "config" or "Config" branch
- Click on any file in the list of files to view it
The file contents are displayed
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 22.214.171.124 "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
Avoid creating branches whose name is "config".