Git repository indexing fails due to "fatal: bad config line 1 in file ./config"

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

For an undetermined reason so far, but most likely due to an instance crash or abrupt shutdown, Fisheye fails to index a Git repository and the following message is written in the atlassian-fisheye.log:

2017-10-18 00:00:05,697 WARN [IncrPing2 gitrepo ] fisheye IndexingPingRequest-doRequest - Exception during FishEye Incremental Indexing of gitrepo (gitrepo): com.cenqua.fisheye.config.ConfigException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: fatal: bad config line 1 in file ./config

Cause

The <FISHEYE_INST>/var/cache/<repo_name>/clone/config file got corrupted.

Resolution

A few things can be done:

  • Compare this corrupted file with the same file from another repository that is not facing the problem and see what the differences are in order to fix the corrupted one.

  • If this repository is configured in any other Fisheye instance by any chance, and that instance is indexing the repository as expected, the config file could copied from the instance that is indexing the repository just fine into this instance that is failing to index that repository. This should be done after shutting down both instances in order to avoid corruption.

  • If there is a recent Fisheye backup which includes repository caches, the backup zip could be expanded into somewhere outside of Fisheye directories (e.g. Desktop) and then the config file could copied from there into <FISHEYE_INST>/var/cache/<repo_name>/clone/config.

  • If there aren't any backups nor other Fisheye instances with that file, the only option left seems to be deleting the repository caches and re-indexing it from scratch by following these steps:
    1. Shutdown Fisheye
    2. Delete the <FISHEYE_INST>/var/cache/<repo_name> directory
    3. Start Fisheye.

Last modified on Oct 24, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.