Hi there,
this is my first steps with gitlab ci/cd, so I already apologize if this is a easy error:
I try to run a job but the job already fails in the preparation stage. Doesn’t matter if I am using a shared runner, hosted by gitlab or my own.
Here is the output of the job:
`Running with gitlab-runner 15.5.0 (0d4137b8)` ` on nettailor-gitlab-runner-docker UKBHPBo3 ` `Preparing the "docker" executor
00:04
` `Using Docker executor with image klakegg/hugo ...` `Pulling docker image klakegg/hugo ...` `Using docker image sha256:9d14c915e665ef64b4c69e53dc819d253e2e8d2e74c0253f2988efe609a75177 for klakegg/hugo with digest klakegg/hugo@sha256:308f1b453e77ec94df7b81a1ecfeb9dbbedc0f8709e81b06e17b05f150fd121b ... ` `Preparing environment
00:01
` `Running on runner-ukbhpbo3-project-40639082-concurrent-0 via 79e800563d07... ` `Getting source from Git repository
00:01
` `error: could not lock config file ~/.gitconfig: No such file or directory ` `Cleaning up project directory and file based variables
00:01
` `ERROR: Job failed: exit code 1`
this is my gitlab-ci.yml
stages:
- build
- deploy
build:
tags:
- nettailor
stage: build
image: klakegg/hugo
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
#- git submodule update --init --recursive
- hugo -d public_html -b "${BLOG_URL}"
cache:
paths:
- public_html
artifacts:
paths:
- public_html
only:
- main
deploy:
tags:
- nettailor
stage: deploy
image: dinofizz/rsync-ssh
script:
- echo "${SSH_PRIVATE_KEY}" > id_rsa
- chmod 700 id_rsa
- mkdir "${HOME}/.ssh"
- echo "${SSH_HOST_KEY}" > "${HOME}/.ssh/known_hosts"
- rsync -hrvz --delete --exclude=_ -e 'ssh -i id_rsa' public_html/ "${SSH_USER_HOST_LOCATION}"
only:
- main
I just don’t get where it is missing the .gitconfig file.
If you need futher infos, just let me know.
Thanks!
zmbcgn