mimic-website icon indicating copy to clipboard operation
mimic-website copied to clipboard

Build process generates error "Failed to read Git log: fatal: not a git repository"

Open tompollard opened this issue 3 years ago • 1 comments

Pushing to the web server triggers a build (via the post receive hook). The build works as expected, but an error is raised:

Failed to read Git log: fatal: not a git repository: '.'

Hugo build seems to be calling a git command outside a git repo. It looks like the issue is discussed here: https://kamaradski.com/hugo-cicd-giterror/

tompollard avatar Jun 24 '21 03:06 tompollard

The simplest fix seems to be to set enableGitInfo to False:

https://github.com/MIT-LCP/mimic-website/blob/36575bfcbf0640a5df067f3180ff7fe1ddc5d6b7/config.toml#L10-L11

From a quick look at the docs, it seems this flag is used to generate "last modified" dates that are displayed on some themes.

tompollard avatar Jun 24 '21 03:06 tompollard