- Recently hugo site deploy has been failing
- I have tried with fedora hugo docker image as well, getting same error
- No changes in .gitlab-ci.yml
Here is the partial log
hugo is the main command, used to build your Hugo site.
Hugo is a Fast and Flexible Static Site Generator
built with love by spf13 and friends in Go.
Complete documentation is available at https://gohugo.io/.
Error: command error: unknown command "sh" for "hugo"
I have same problem:
Use “hugo [command] --help” for more information about a command.
Error: command error: unknown command “sh” for “hugo”
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1
I found a solution after multiple tries.
Adding an empty entrypoint fixes the issues.
Thanks, but where must I write these lines? My gitlab-ci.yml is in first part:
- hugo --minify
change this part:
Had this happen too without having changed anything, I’m guessing the docker image entry point changed? I’m also pulling latest so that’s the only thing I can think of
I believe it is related to Docker version see For Docker 17.06 and later: in Run your CI/CD jobs in Docker containers | GitLab
Change your gitlab-ci.yml first part like this: