본문 바로가기
web

ERROR Failed to read Git log: fatal: not a git repository (or any of the parent directories): .git

by seohan1010 2026. 2. 6.

 

hugo 이미지를 실행시키면 해당 directory가 git repo가 아니라는 에러가 발생
hugo site 파일이 있는 root 디렉터리에 .git이 없거나 git repo가 아니어서 발생하는 문제 

방법1.
hugo.toml 설정 파일에서 해당 옵션을 false로 설정 

방법2.
hugo 명령어 실행시 --enableGitInfo=false
옵션을 인지라로 입력해준다. 

기존 출력

 

compose 파일에서 docker image에 사용될 entrypoint 명령어에 
옵션을 추가 

 

hugo 서버가 정상 실행