Gitlab-runner on windows seems to only pull files with CRLF format even with autocrlf set to false

When I clone my repository on Windows or Linux, the files are in LF format.

When cloned via the build pipeline, using my gitlab runner, the files are in CRLF. This breaks conan.

C:\GitLab-Runner>git config --list
core.symlinks=false
core.autocrlf=false
core.fscache=true
color.interactive=true
color.ui=auto
help.format=html
diff.astextplain.textconv=astextplain
rebase.autosquash=true
filter.lfs.clean=git-lfs clean – %f
filter.lfs.smudge=git-lfs smudge – %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=!“C:/PortableGit/mingw64/bin/git-credential-manager.exe”
user.name=ebs_secinfra_bot
user.email=thomas.floodeenjr@siemens.com
credential.helperselector.selected=manager
credential.
credential.gitlabauthmodes=token
core.eol=lf
core.autocrlf=false

config.toml:

concurrent = 1
check_interval = 0
shutdown_timeout = 0

[session_server]
session_timeout = 1800

[[runners]]
name = “MY_RUNNER”
url = “<MY_URL>”
id = 7314
token = “<MY_TOKEN>”
token_obtained_at = 2023-08-09T19:41:40Z
token_expires_at = 0001-01-01T00:00:00Z
executor = “docker”
shell = “powershell”
[runners.docker]
tls_verify = true
image = “<MY_IMAGE>”
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
allowed_images = [“<MY_IMAGE>/:”]
allowed_pull_policies = [“always”, “if-not-present”]
allowed_services = [“<MY_IMAGE>/:”]
shm_size = 0

This seems to fix the problem:

Line endings for multiple platforms

When you run pipelines on multiple platforms, you can sometimes encounter problems with different line endings. Historically, Linux and macOS used linefeed (LF) characters while Windows used a carriage return plus a linefeed (CRLF). Git tries to compensate for the difference by automatically making lines end in LF in the repo but CRLF in the working directory on Windows.Most Windows tools are fine with LF-only endings, and this automatic behavior can cause more problems than it solves. If you encounter issues based on line endings, we recommend you configure Git to prefer LF everywhere. To do this, add a .gitattributes file to the root of your repository. In that file, add the following line:

“* text eol=lf”