Skip to content
Snippets Groups Projects
Commit c08b5bd2 authored by Thierry Escande's avatar Thierry Escande Committed by Esben Haabendal
Browse files

CI: Set CI project directory safe for git

Since the git clone done by CI has its own uid and git operations
occurring within the build container uses a different uid, we need to
add the CI_PROJECT_DIR folder to the safe directory git configuration.

This is related to CVE-2022-24765 [1].

[1] https://github.blog/2022-04-12-git-security-vulnerability-announced/



Signed-off-by: default avatarThierry Escande <thierry.escande@huawei.com>
parent 62533411
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,8 @@ stages:
BB_ENV_PASSTHROUGH_ADDITIONS: DISTRO MACHINE
SOURCE_MIRROR_URL_CH: http://114.116.235.68/source-mirror
before_script:
# Tell git this repository is safe even if cloned with a different uid
- git config --global --add safe.directory $CI_PROJECT_DIR
# The repo tool seems to insist on having a branch checked out or
# something like that... Without this we get errors like
# fatal: couldn't find remote ref refs/heads/master
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment