meta data for this page
  •  

This is an old revision of the document!


safe.directory

Symptoms

fatal: detected dubious ownership in repository at
fatal: unsafe repository ('/builds/rPrca3qv/0/group/project' is owned by someone else)
To add an exception for this directory, call:
	git config --global --add safe.directory /builds/rPrca3qv/0/group/project

Source of problem

Workaround

Workaround for Yocto

Fix in Poky: bitbake.conf: mark all directories as safe for git to read

This variable can be added to local.conf, but it invalidates whole sstate. Simple solution is to fix one recipe:

do_compile_prepend() {
    git config --global --add safe.directory ${S}
}

Workaround for Gitlab CI