Gitlab runner cant perform git command

I’ve facing this problem for the CI/CD pipeline, it always failed in git command resulting error of

fatal: detected dubious ownership in repository at ‘/home/adadev/docker_folder//…’

I’ve tried adding safe.directory “*” in the runner env and some git command finally able to run (such as, git branch)

But the problem still remains when im about to git stash. The job just forced ended without any error log/ traces even if I see the full raw

Cleaning up project directory and file based variables00:00

[39](https://repo.polytron.co.id/ADA/commercial/digitec-tv/-/jobs/5826#L39)ERROR: Job failed: exit status 1

Gitlab runner version : 16.1.0


Updates:

  • I tried running gitlab-runner in debug mode and using command sudo gitlab-runner --debug run
  • its working and the CI build success
  • when I stop and try to run sudo gitlab-runner start the job keep failing again

Why do you run git stash?

Have you tried checking repository ownership and permissions and reviewing the safe.directory configuration in the runner environment. Also try avoiding using debug mode for regular use.